Traced fans not spinning to incorrect PWM value being written.
The passed in value was written instead of the calulated value.
Fixes: 54187ff9d7 ("hwmon: (max31790) Convert to use new hwmon registration API")
Signed-off-by: Alex Hemme <ahemme@cisco.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
We should only dereference "data" after we check if it is an error
pointer.
Fixes: 54187ff9d7 ('hwmon: (max31790) Convert to use new hwmon registration API')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
max31790_update_device() return the error code in ERR_PTR. We were
checking if it has returned error or not but before checking we have
dereferenced it.
Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>