Re: [PATCH] hwmon: lm80: fix a missing check of return value

2019-01-02 Thread Guenter Roeck
On Wed, Jan 02, 2019 at 06:23:59PM +0300, Dan Carpenter wrote: > Hi Kangjie, > > Thank you for the patch! Perhaps something to improve: > > url: > https://github.com/0day-ci/linux/commits/Kangjie-Lu/hwmon-lm80-fix-a-missing-check-of-return-value/20181222-023000 > base: >

Re: [PATCH] hwmon: lm80: fix a missing check of return value

2019-01-02 Thread Dan Carpenter
Hi Kangjie, Thank you for the patch! Perhaps something to improve: url: https://github.com/0day-ci/linux/commits/Kangjie-Lu/hwmon-lm80-fix-a-missing-check-of-return-value/20181222-023000 base: https://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging.git hwmon-next smatch

Re: [PATCH] hwmon: lm80: fix a missing check of return value

2018-12-21 Thread Guenter Roeck
On 12/20/18 10:13 PM, Kangjie Lu wrote: 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: Kangjie

[PATCH] hwmon: lm80: fix a missing check of return value

2018-12-20 Thread Kangjie Lu
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: Kangjie Lu --- drivers/hwmon/lm80.c | 15