platform/x86: hp-wmi: Do not shadow errors in sysfs show functions
authorDarren Hart (VMware) <dvhart@infradead.org>
Thu, 20 Apr 2017 01:11:33 +0000 (18:11 -0700)
committerDarren Hart (VMware) <dvhart@infradead.org>
Thu, 20 Apr 2017 20:26:18 +0000 (13:26 -0700)
commita055f9ecb5b4d0cb8b33ba664363a2ed7804a6c7
tree01b87a06997ebe4fd8a4b26a205738ce7fc4d528
parentc21ee12f460c33fcc12fe162c9ab98f3c58073aa
platform/x86: hp-wmi: Do not shadow errors in sysfs show functions

The new hp_wmi_read_int function returns a negative value in case of
error, pass this on directly rather than always replacing it with
-EINVAL.

Signed-off-by: Darren Hart (VMware) <dvhart@infradead.org>
Tested-by: Carlo Caione <carlo@endlessm.com>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
drivers/platform/x86/hp-wmi.c