Skip to content

Commit

Permalink
PCI Hotplug: cpqhp_pushbutton_thread(): remove a pointless if() check
Browse files Browse the repository at this point in the history
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: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Adrian Bunk authored and Greg Kroah-Hartman committed Nov 5, 2007
1 parent d73460d commit 0039541
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions drivers/pci/hotplug/cpqphp_ctrl.c
Original file line number Diff line number Diff line change
Expand Up @@ -1931,16 +1931,14 @@ void cpqhp_pushbutton_thread(unsigned long slot)
return ;
}

if (func != NULL && ctrl != NULL) {
if (cpqhp_process_SS(ctrl, func) != 0) {
amber_LED_on (ctrl, hp_slot);
green_LED_on (ctrl, hp_slot);

set_SOGO(ctrl);
if (cpqhp_process_SS(ctrl, func) != 0) {
amber_LED_on(ctrl, hp_slot);
green_LED_on(ctrl, hp_slot);

/* Wait for SOBS to be unset */
wait_for_ctrl_irq (ctrl);
}
set_SOGO(ctrl);

/* Wait for SOBS to be unset */
wait_for_ctrl_irq(ctrl);
}

p_slot->state = STATIC_STATE;
Expand Down

0 comments on commit 0039541

Please sign in to comment.