Skip to content
Commit 2355375e authored by Guenter Roeck's avatar Guenter Roeck
Browse files

hwmon: (emc2103) Fix use of an uninitilized variable in error case



Fix:

emc2103.c: In function set_pwm_enable:
emc2103.c:463:12: warning: conf_reg may be used uninitialized in this function

by checking the return value from read_u8_from_i2c(). This fixes a real problem,
as conf_reg is really uninitialized if read_u8_from_i2c returns an error.

Signed-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
Reviewed-by: default avatarRobert Coulson <robert.coulson@ericsson.com>
Acked-by: default avatarJean Delvare <khali@linux-fr.org>
parent ac852edb
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