summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinas Vepstas <linas@austin.ibm.com>2007-04-14 00:34:11 +0200
committerGreg Kroah-Hartman <gregkh@suse.de>2007-05-03 04:02:39 +0200
commit3499f0726ec179afd19669070681ac457d27033f (patch)
tree5a7f84dea65852d448074708a654a83fbee4838c
parentPCI: rpaphp: Fix a memleak; slot->location string was never freed (diff)
downloadlinux-3499f0726ec179afd19669070681ac457d27033f.tar.xz
linux-3499f0726ec179afd19669070681ac457d27033f.zip
PCI: rpaphp: Remove un-needed goto
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>
-rw-r--r--drivers/pci/hotplug/rpaphp_slot.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/pci/hotplug/rpaphp_slot.c b/drivers/pci/hotplug/rpaphp_slot.c
index 865b0b7ef20c..9b9400727985 100644
--- a/drivers/pci/hotplug/rpaphp_slot.c
+++ b/drivers/pci/hotplug/rpaphp_slot.c
@@ -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;
}