platform/x86: fujitsu-laptop: do not log LED registration failures
authorMichał Kępień <kernel@kempniu.pl>
Fri, 7 Apr 2017 13:07:12 +0000 (15:07 +0200)
committerDarren Hart (VMware) <dvhart@infradead.org>
Wed, 19 Apr 2017 19:57:25 +0000 (12:57 -0700)
commit30943e1484aab78d83ddfb706bca65c5d8092bfb
tree1dcf66fc16533ef697c40ea7df6fe7c84aed2cc2
parent81f6821f3f7e231b83dca1fb44bf9ddaa3313421
platform/x86: fujitsu-laptop: do not log LED registration failures

If acpi_fujitsu_laptop_leds_register() returns an error, the latter will
become the return value of acpi_fujitsu_laptop_add(), which in turn will
be reported by driver core.  Simplify code by replacing pr_err() calls
with return statements.  Return 0 instead of result when no errors occur
in order to make the code easier to read.

Signed-off-by: Michał Kępień <kernel@kempniu.pl>
Reviewed-by: Jonathan Woithe <jwoithe@just42.net>
Signed-off-by: Darren Hart (VMware) <dvhart@infradead.org>
drivers/platform/x86/fujitsu-laptop.c