aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci/hotplug
diff options
context:
space:
mode:
authorAdrian Bunk <bunk@kernel.org>2007-10-24 12:25:00 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2007-11-05 16:35:17 -0500
commit00395410885cac96015850426bf697423a3ec9dc (patch)
tree74103fb4036fb5d31e5a331d08c7b8d126f793a7 /drivers/pci/hotplug
parentd73460d79bc88de74221d73723ed61a0081b7a36 (diff)
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: Adrian Bunk <bunk@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/pci/hotplug')
-rw-r--r--drivers/pci/hotplug/cpqphp_ctrl.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/drivers/pci/hotplug/cpqphp_ctrl.c b/drivers/pci/hotplug/cpqphp_ctrl.c
index 3ef0a4875a62..856d57b4d604 100644
--- a/drivers/pci/hotplug/cpqphp_ctrl.c
+++ b/drivers/pci/hotplug/cpqphp_ctrl.c
@@ -1931,16 +1931,14 @@ void cpqhp_pushbutton_thread(unsigned long slot)
1931 return ; 1931 return ;
1932 } 1932 }
1933 1933
1934 if (func != NULL && ctrl != NULL) { 1934 if (cpqhp_process_SS(ctrl, func) != 0) {
1935 if (cpqhp_process_SS(ctrl, func) != 0) { 1935 amber_LED_on(ctrl, hp_slot);
1936 amber_LED_on (ctrl, hp_slot); 1936 green_LED_on(ctrl, hp_slot);
1937 green_LED_on (ctrl, hp_slot);
1938
1939 set_SOGO(ctrl);
1940 1937
1941 /* Wait for SOBS to be unset */ 1938 set_SOGO(ctrl);
1942 wait_for_ctrl_irq (ctrl); 1939
1943 } 1940 /* Wait for SOBS to be unset */
1941 wait_for_ctrl_irq(ctrl);
1944 } 1942 }
1945 1943
1946 p_slot->state = STATIC_STATE; 1944 p_slot->state = STATIC_STATE;