]> git.baikalelectronics.ru Git - kernel.git/commit
platform/x86: fujitsu-laptop: Don't oops when FUJ02E3 is not presnt
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Mon, 18 Sep 2017 20:00:59 +0000 (23:00 +0300)
committerDarren Hart (VMware) <dvhart@infradead.org>
Wed, 27 Sep 2017 07:04:43 +0000 (00:04 -0700)
commitf30542a30b7d16e723485495e2ceb3c2e73f92b3
treeb3628d20cb9c266c8041f76866a562434f36eacd
parent384fde7ed224f283f11ef2a592b05d4a29492aa8
platform/x86: fujitsu-laptop: Don't oops when FUJ02E3 is not presnt

My Fujitsu-Siemens Lifebook S6120 doesn't have the FUJ02E3 device,
but it does have FUJ02B1. That means we do register the backlight
device (and it even seems to work), but the code will oops as soon
as we try to set the backlight brightness because it's trying to
call call_fext_func() with a NULL device. Let's just skip those
function calls when the FUJ02E3 device is not present.

Cc: Jonathan Woithe <jwoithe@just42.net>
Cc: Andy Shevchenko <andy@infradead.org>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Cc: <stable@vger.kernel.org> # 4.13.x
Signed-off-by: Darren Hart (VMware) <dvhart@infradead.org>
drivers/platform/x86/fujitsu-laptop.c