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>
This commit is contained in:
Guenter Roeck 2014-02-11 21:38:31 -08:00
parent 2065bdd64c
commit f44e5c5cf9
1 changed files with 1 additions and 1 deletions

View File

@ -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).