hwmon: (atxp1) Set and use error code from vid_to_reg()
authorGuenter Roeck <linux@roeck-us.net>
Fri, 13 Sep 2013 17:59:27 +0000 (10:59 -0700)
committerGuenter Roeck <linux@roeck-us.net>
Sun, 13 Oct 2013 23:16:26 +0000 (16:16 -0700)
commit674d0ed8588c11ec9f70c8427ac83a73e0d156d5
treeb9494f789c84371fa68af0bcc6307f392d5ef77d
parent19f053c8406542eafb534b33d698677f076a3421
hwmon: (atxp1) Set and use error code from vid_to_reg()

vid_to_reg() returns -1 if it encounters an error. Return -EINVAL instead.
Its only caller, atxp1_storevcore(), doesn't use the return code but
returns -1 instead, which is wrong anyway as it means -EPERM.
Use the return value from vid_to_reg() instead to report the error.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Reviewed-by: Jean Delvare <khali@linux-fr.org>
drivers/hwmon/atxp1.c
include/linux/hwmon-vid.h