diff options
author | Kangjie Lu <kjlu@umn.edu> | 2018-12-21 13:10:39 -0600 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-02-12 19:44:57 +0100 |
commit | ecbf70b1586786ad84eead30246ecc2ef87de417 (patch) | |
tree | fedfec099af1eba7cc7f12347b4a72d5ef3a8f59 /lib | |
parent | 0138dfb7b3325dcd7347ccaa0c256c6fd9239b8d (diff) |
hwmon: (lm80) fix a missing check of bus read in lm80 probe
[ Upstream commit 9aa3aa15f4c2f74f47afd6c5db4b420fadf3f315 ]
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: Kangjie Lu <kjlu@umn.edu>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'lib')
0 files changed, 0 insertions, 0 deletions