Commit 00395410 authored by Adrian Bunk's avatar Adrian Bunk Committed by Greg Kroah-Hartman

PCI Hotplug: cpqhp_pushbutton_thread(): remove a pointless if() check

The Coverity checker spotted that we'd have already oops'ed if "ctrl"
was NULL.

Additionally, "func" had just been checked for not being NULL.
Signed-off-by: default avatarAdrian Bunk <bunk@kernel.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent d73460d7
...@@ -1931,16 +1931,14 @@ void cpqhp_pushbutton_thread(unsigned long slot) ...@@ -1931,16 +1931,14 @@ void cpqhp_pushbutton_thread(unsigned long slot)
return ; return ;
} }
if (func != NULL && ctrl != NULL) { if (cpqhp_process_SS(ctrl, func) != 0) {
if (cpqhp_process_SS(ctrl, func) != 0) { amber_LED_on(ctrl, hp_slot);
amber_LED_on (ctrl, hp_slot); green_LED_on(ctrl, hp_slot);
green_LED_on (ctrl, hp_slot);
set_SOGO(ctrl);
/* Wait for SOBS to be unset */ set_SOGO(ctrl);
wait_for_ctrl_irq (ctrl);
} /* Wait for SOBS to be unset */
wait_for_ctrl_irq(ctrl);
} }
p_slot->state = STATIC_STATE; p_slot->state = STATIC_STATE;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment