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: NAnssi Hannula <anssi.hannula@iki.fi> Signed-off-by: NMatthew Garrett <mjg@redhat.com>
Showing
想要评论请 注册 或 登录