diff options
Diffstat (limited to 'drivers/net/fs_enet/mii-bitbang.c')
-rw-r--r-- | drivers/net/fs_enet/mii-bitbang.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/net/fs_enet/mii-bitbang.c b/drivers/net/fs_enet/mii-bitbang.c index 2774252c2352..49b6645d7e0c 100644 --- a/drivers/net/fs_enet/mii-bitbang.c +++ b/drivers/net/fs_enet/mii-bitbang.c | |||
@@ -218,9 +218,9 @@ out_free_irqs: | |||
218 | out_unmap_regs: | 218 | out_unmap_regs: |
219 | iounmap(bitbang->dir); | 219 | iounmap(bitbang->dir); |
220 | out_free_bus: | 220 | out_free_bus: |
221 | kfree(new_bus); | ||
222 | out_free_priv: | ||
223 | free_mdio_bitbang(new_bus); | 221 | free_mdio_bitbang(new_bus); |
222 | out_free_priv: | ||
223 | kfree(bitbang); | ||
224 | out: | 224 | out: |
225 | return ret; | 225 | return ret; |
226 | } | 226 | } |
@@ -231,12 +231,11 @@ static int fs_enet_mdio_remove(struct of_device *ofdev) | |||
231 | struct bb_info *bitbang = bus->priv; | 231 | struct bb_info *bitbang = bus->priv; |
232 | 232 | ||
233 | mdiobus_unregister(bus); | 233 | mdiobus_unregister(bus); |
234 | free_mdio_bitbang(bus); | ||
235 | dev_set_drvdata(&ofdev->dev, NULL); | 234 | dev_set_drvdata(&ofdev->dev, NULL); |
236 | kfree(bus->irq); | 235 | kfree(bus->irq); |
236 | free_mdio_bitbang(bus); | ||
237 | iounmap(bitbang->dir); | 237 | iounmap(bitbang->dir); |
238 | kfree(bitbang); | 238 | kfree(bitbang); |
239 | kfree(bus); | ||
240 | 239 | ||
241 | return 0; | 240 | return 0; |
242 | } | 241 | } |