]> git.baikalelectronics.ru Git - kernel.git/commit
hwmon: (w83773g) Fix fault detection and reporting
authorGuenter Roeck <linux@roeck-us.net>
Sun, 3 Dec 2017 23:27:56 +0000 (15:27 -0800)
committerGuenter Roeck <linux@roeck-us.net>
Tue, 2 Jan 2018 23:05:34 +0000 (15:05 -0800)
commit9bb0543cb27f586330d8b310c771e098ed5da02e
tree1e9fa4097eb343ac524f4e2ddc35ec5288f9ef91
parent377a83e0d6429409b628188c46e0ac62862a2697
hwmon: (w83773g) Fix fault detection and reporting

Smatch reports:

drivers/hwmon/w83773g.c:105
get_fault() warn: shift has higher precedence than mask

Code analysis shows that the code is indeed wrong.
Fix it, and while we are at it, drop unnecessary typecast.

Fixes: 86a10c802362 ("hwmon: Add W83773G driver")
Cc: Lei YU <mine260309@gmail.com>
Reviewed-by: Lei YU <mine260309@gmail.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
drivers/hwmon/w83773g.c