]> git.baikalelectronics.ru Git - kernel.git/commit
hp-wmi: clear rfkill device pointers when appropriate
authorAnssi Hannula <anssi.hannula@iki.fi>
Sun, 20 Feb 2011 18:07:24 +0000 (20:07 +0200)
committerMatthew Garrett <mjg@redhat.com>
Mon, 28 Mar 2011 10:07:18 +0000 (06:07 -0400)
commit247d2a06c3d346cccbc30a350645188b5b5620e7
treef94034daa9f0ae2969e3fabebd2601622f5eb9a5
parentdd4ffc0e195d1730eb8476b6dc1c2651db0d7714
hp-wmi: clear rfkill device pointers when appropriate

NULLify rfkill pointers during initialization. This prevents dereference
of invalid pointer in case the driver is rebound and some rfkill device
isn't detected anymore. Clear them also in hp_wmi_rfkill_setup failure
path so that an rfkill initialization failure doesn't need to be fatal
for the whole driver.

Signed-off-by: Anssi Hannula <anssi.hannula@iki.fi>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
drivers/platform/x86/hp-wmi.c