aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/fs_enet/mii-fec.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/fs_enet/mii-fec.c')
-rw-r--r--drivers/net/fs_enet/mii-fec.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/net/fs_enet/mii-fec.c b/drivers/net/fs_enet/mii-fec.c
index 4d89a22317ac..28077cc1b949 100644
--- a/drivers/net/fs_enet/mii-fec.c
+++ b/drivers/net/fs_enet/mii-fec.c
@@ -128,7 +128,7 @@ static int __devinit fs_enet_mdio_probe(struct of_device *ofdev,
128 struct fec_info *fec; 128 struct fec_info *fec;
129 int ret = -ENOMEM, i; 129 int ret = -ENOMEM, i;
130 130
131 new_bus = kzalloc(sizeof(struct mii_bus), GFP_KERNEL); 131 new_bus = mdiobus_alloc();
132 if (!new_bus) 132 if (!new_bus)
133 goto out; 133 goto out;
134 134
@@ -190,7 +190,7 @@ out_res:
190out_fec: 190out_fec:
191 kfree(fec); 191 kfree(fec);
192out_mii: 192out_mii:
193 kfree(new_bus); 193 mdiobus_free(new_bus);
194out: 194out:
195 return ret; 195 return ret;
196} 196}
@@ -205,7 +205,7 @@ static int fs_enet_mdio_remove(struct of_device *ofdev)
205 kfree(bus->irq); 205 kfree(bus->irq);
206 iounmap(fec->fecp); 206 iounmap(fec->fecp);
207 kfree(fec); 207 kfree(fec);
208 kfree(bus); 208 mdiobus_free(bus);
209 209
210 return 0; 210 return 0;
211} 211}