hwmon: (lm90) Add missing assignment
Subsystems (2)
Guenter Roeck
maintainerPATCH 1/1 hwmon: (lm90) Add missing assignment
Coverity reports the following error.
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
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;
--- drivers/hwmon/lm90.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/hwmon/lm90.c +1 -1
@@ -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 ;
Signature · 1 line
2.5.0
Hi Guenter,
Quoted 19 lines · Guenter Roeck
Coverity reports the following error.
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
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;Signed-off-by Guenter Roeck <[email protected]>--- drivers/hwmon/lm90.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/hwmon/lm90.c +0
-0
drivers/hwmon/lm90.c static int lm90_update_limits(struct device *dev) · line 535
Quoted 8 lines
drivers/hwmon/lm90.c +1
-1@@ -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 ;
Good catch.
Signature · 2 lines
Jean Delvare SUSE L3 Support