]> err.no Git - linux-2.6/blobdiff - drivers/pci/hotplug/cpqphp_ctrl.c
PCI Hotplug: cpqhp_pushbutton_thread(): remove a pointless if() check
[linux-2.6] / drivers / pci / hotplug / cpqphp_ctrl.c
index 3ef0a4875a62a21ee4eff4d44e568f8632364918..856d57b4d6044539c50b4f631107c03f1df5891d 100644 (file)
@@ -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;