hwmon: (max31790) Fix dereference of ERR_PTR
authorSudip Mukherjee <sudipm.mukherjee@gmail.com>
Wed, 16 Sep 2015 14:02:59 +0000 (19:32 +0530)
committerGuenter Roeck <linux@roeck-us.net>
Wed, 14 Oct 2015 14:57:14 +0000 (07:57 -0700)
commit791432cfd95bea3515f8cdfaf72ec263e5d3da80
tree6ee42f86b2870a6956f7285aabcfd299f0597634
parent195a4b4298a7951c845dac2b326585c66add3435
hwmon: (max31790) Fix dereference of ERR_PTR

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>
drivers/hwmon/max31790.c