Skip to content
Commit 9aa3aa15 authored by Kangjie Lu's avatar Kangjie Lu Committed by Guenter Roeck
Browse files

hwmon: (lm80) fix a missing check of bus read in lm80 probe



In lm80_probe(), if lm80_read_value() fails, it returns a negative
error number which is stored to data->fan[f_min] and will be further
used. We should avoid using the data if the read fails.

The fix checks if lm80_read_value() fails, and if so, returns with the
error number.

Signed-off-by: default avatarKangjie Lu <kjlu@umn.edu>
Signed-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
parent c9c63915
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment