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

hwmon: (lm80) fix a missing check of the status of SMBus read



If lm80_read_value() fails, it returns a negative number instead of the
correct read data. Therefore, we should avoid using the data if it
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>
[groeck: One variable for return values is enough]
Signed-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
parent f9facc24
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