diff options
author | Guenter Roeck <linux@roeck-us.net> | 2014-02-12 06:38:31 +0100 |
---|---|---|
committer | Guenter Roeck <linux@roeck-us.net> | 2014-03-03 17:01:03 +0100 |
commit | f44e5c5cf9303daac57be0aa01bc0e8f29f1b9bd (patch) | |
tree | 2d0f8ac77d825e070fb4722dfa12eaf299c20092 /drivers/hwmon/smm665.c | |
parent | hwmon: (ltc4260) Fix trivial typo (diff) | |
download | linux-f44e5c5cf9303daac57be0aa01bc0e8f29f1b9bd.tar.xz linux-f44e5c5cf9303daac57be0aa01bc0e8f29f1b9bd.zip |
hwmon: (smm665): Return error from i2c_smbus_read_word_swapped
There is no reason to replace one error code with another,
and returning -1 as error code is wrong anyway.
Smatch log:
drivers/hwmon/smm665.c:225 smm665_read_adc() info: why not propagate 'rv'
from i2c_smbus_read_word_swapped() instead of (-1)?
Reviewed-by: Jean Delvare <jdelvare@suse.de>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Diffstat (limited to 'drivers/hwmon/smm665.c')
-rw-r--r-- | drivers/hwmon/smm665.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/hwmon/smm665.c b/drivers/hwmon/smm665.c index d9e1b7de78da..4ef5802df6d8 100644 --- a/drivers/hwmon/smm665.c +++ b/drivers/hwmon/smm665.c @@ -222,7 +222,7 @@ static int smm665_read_adc(struct smm665_data *data, int adc) rv = i2c_smbus_read_word_swapped(client, 0); if (rv < 0) { dev_dbg(&client->dev, "Failed to read ADC value: error %d", rv); - return -1; + return rv; } /* * Validate/verify readback adc channel (in bit 11..14). |