]> err.no Git - linux-2.6/commitdiff
PCI: rpaphp: Remove un-needed goto
authorLinas Vepstas <linas@austin.ibm.com>
Fri, 13 Apr 2007 22:34:11 +0000 (15:34 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 3 May 2007 02:02:39 +0000 (19:02 -0700)
Remove un-needed goto.

Signed-off-by: Linas Vepstas <linas@austin.ibm.com>
Cc: John Rose <johnrose@austin.ibm.com>
Signed-off-by: Kristen Carlson Accardi <kristen.c.accardi@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/pci/hotplug/rpaphp_slot.c

index 865b0b7ef20c4164ed8578abfa5e93bc5b28d7b4..9b940072798596cd09bc801838c2056c33ef2356 100644 (file)
@@ -157,14 +157,13 @@ int rpaphp_register_slot(struct slot *slot)
        /* should not try to register the same slot twice */
        if (is_registered(slot)) {
                err("rpaphp_register_slot: slot[%s] is already registered\n", slot->name);
-               retval = -EAGAIN;
-               goto register_fail;
+               return -EAGAIN;
        }       
 
        retval = pci_hp_register(php_slot);
        if (retval) {
                err("pci_hp_register failed with error %d\n", retval);
-               goto register_fail;
+               return retval;
        }
 
        /* create "phy_location" file */
@@ -182,7 +181,6 @@ int rpaphp_register_slot(struct slot *slot)
 
 sysfs_fail:
        pci_hp_deregister(php_slot);
-register_fail:
        return retval;
 }