]> Git Repo - linux.git/commitdiff
hwmon: (adt7462) Fix an error return in ADT7462_REG_VOLT()
authorDan Carpenter <[email protected]>
Tue, 3 Mar 2020 10:16:08 +0000 (13:16 +0300)
committerGuenter Roeck <[email protected]>
Tue, 3 Mar 2020 20:42:55 +0000 (12:42 -0800)
This is only called from adt7462_update_device().  The caller expects it
to return zero on error.  I fixed a similar issue earlier in commit
a4bf06d58f21 ("hwmon: (adt7462) ADT7462_REG_VOLT_MAX() should return 0")
but I missed this one.

Fixes: c0b4e3ab0c76 ("adt7462: new hwmon driver")
Signed-off-by: Dan Carpenter <[email protected]>
Reviewed-by: Darrick J. Wong <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Guenter Roeck <[email protected]>
drivers/hwmon/adt7462.c

index 9632e2e3c4bb4067cd58a1fb2f4252ab20e13c0a..319a0519ebdb0f44a675cd241a85a114b2b8dc7f 100644 (file)
@@ -413,7 +413,7 @@ static int ADT7462_REG_VOLT(struct adt7462_data *data, int which)
                        return 0x95;
                break;
        }
-       return -ENODEV;
+       return 0;
 }
 
 /* Provide labels for sysfs */
This page took 0.066326 seconds and 4 git commands to generate.