diff options
Diffstat (limited to 'drivers/pci/hotplug/rpaphp_slot.c')
-rw-r--r-- | drivers/pci/hotplug/rpaphp_slot.c | 6 |
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) | |||
157 | /* should not try to register the same slot twice */ | 157 | /* should not try to register the same slot twice */ |
158 | if (is_registered(slot)) { | 158 | if (is_registered(slot)) { |
159 | err("rpaphp_register_slot: slot[%s] is already registered\n", slot->name); | 159 | err("rpaphp_register_slot: slot[%s] is already registered\n", slot->name); |
160 | retval = -EAGAIN; | 160 | return -EAGAIN; |
161 | goto register_fail; | ||
162 | } | 161 | } |
163 | 162 | ||
164 | retval = pci_hp_register(php_slot); | 163 | retval = pci_hp_register(php_slot); |
165 | if (retval) { | 164 | if (retval) { |
166 | err("pci_hp_register failed with error %d\n", retval); | 165 | err("pci_hp_register failed with error %d\n", retval); |
167 | goto register_fail; | 166 | return retval; |
168 | } | 167 | } |
169 | 168 | ||
170 | /* create "phy_location" file */ | 169 | /* create "phy_location" file */ |
@@ -182,7 +181,6 @@ int rpaphp_register_slot(struct slot *slot) | |||
182 | 181 | ||
183 | sysfs_fail: | 182 | sysfs_fail: |
184 | pci_hp_deregister(php_slot); | 183 | pci_hp_deregister(php_slot); |
185 | register_fail: | ||
186 | return retval; | 184 | return retval; |
187 | } | 185 | } |
188 | 186 | ||