hwmon: (lm90) Add missing assignment
authorGuenter Roeck <linux@roeck-us.net>
Mon, 25 Jul 2016 21:47:18 +0000 (14:47 -0700)
committerGuenter Roeck <linux@roeck-us.net>
Sun, 31 Jul 2016 22:01:06 +0000 (15:01 -0700)
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: 10bfef47bd259 ("hwmon: (lm90) Read limit registers only once")
Reviewed-by: Jean Delvare <jdelvare@suse.de>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
drivers/hwmon/lm90.c

index f51e758ba5298c1d05f5c5301ea57dc95204b85c..7b3eedf76c627f82c3c0c7ccdc3fa1d6f17bf8a1 100644 (file)
@@ -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;