diff options
author | Kangjie Lu <kjlu@umn.edu> | 2018-12-21 13:10:39 -0600 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-02-20 10:13:12 +0100 |
commit | 90beb6bbed6719bf5ee73dadebe6fd99cb57cc98 (patch) | |
tree | 17c2799df8961c09ad220c7a7141cd74fbd5aa69 /lib | |
parent | 259c502d0a0fee860097ed5fa0061223a302003b (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