Skip to content

Commit e680a40

Browse files
brglbroonie
authored andcommitted
regmap: fix the kerneldoc for regmap_test_bits()
The kerneldoc comment for regmap_test_bits() says that it returns -1 on regmap_read() failure. This is not true - it will propagate the error code returned by regmap_read(). Fix it. Fixes: aa2ff9d ("regmap: provide helpers for simple bit operations") Signed-off-by: Bartosz Golaszewski <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent 53d8609 commit e680a40

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

drivers/base/regmap/regmap.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2936,8 +2936,9 @@ EXPORT_SYMBOL_GPL(regmap_update_bits_base);
29362936
* @reg: Register to read from
29372937
* @bits: Bits to test
29382938
*
2939-
* Returns -1 if the underlying regmap_read() fails, 0 if at least one of the
2940-
* tested bits is not set and 1 if all tested bits are set.
2939+
* Returns 0 if at least one of the tested bits is not set, 1 if all tested
2940+
* bits are set and a negative error number if the underlying regmap_read()
2941+
* fails.
29412942
*/
29422943
int regmap_test_bits(struct regmap *map, unsigned int reg, unsigned int bits)
29432944
{

0 commit comments

Comments
 (0)