Commit be9d6374 authored by Guenter Roeck's avatar Guenter Roeck

hwmon: (lm90) Add missing assignment

Coverity reports the following error.

>>>     CID 1364474:  Error handling issues  (CHECKED_RETURN)
>>>     Calling "lm90_read_reg" without checking return value (as is done
>>>     elsewhere 28 out of 29 times).
532             lm90_read_reg(client, LM90_REG_R_REMOTE_LOWH);
533             if (val < 0)
534                     return val;

Fixes: 10bfef47 ("hwmon: (lm90) Read limit registers only once")
Reviewed-by: default avatarJean Delvare <jdelvare@suse.de>
Signed-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
parent 991f9fa9
......@@ -529,7 +529,7 @@ static int lm90_update_limits(struct device *dev)
return val;
data->temp_hyst = val;
lm90_read_reg(client, LM90_REG_R_REMOTE_LOWH);
val = lm90_read_reg(client, LM90_REG_R_REMOTE_LOWH);
if (val < 0)
return val;
data->temp11[REMOTE_LOW] = val << 8;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment