aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/fsl_pq_mdio.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/fsl_pq_mdio.c')
-rw-r--r--drivers/net/fsl_pq_mdio.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/net/fsl_pq_mdio.c b/drivers/net/fsl_pq_mdio.c
index 3acac5f930c8..ff028f59b930 100644
--- a/drivers/net/fsl_pq_mdio.c
+++ b/drivers/net/fsl_pq_mdio.c
@@ -277,15 +277,17 @@ static int fsl_pq_mdio_probe(struct of_device *ofdev,
277 int tbiaddr = -1; 277 int tbiaddr = -1;
278 const u32 *addrp; 278 const u32 *addrp;
279 u64 addr = 0, size = 0; 279 u64 addr = 0, size = 0;
280 int err = 0; 280 int err;
281 281
282 priv = kzalloc(sizeof(*priv), GFP_KERNEL); 282 priv = kzalloc(sizeof(*priv), GFP_KERNEL);
283 if (!priv) 283 if (!priv)
284 return -ENOMEM; 284 return -ENOMEM;
285 285
286 new_bus = mdiobus_alloc(); 286 new_bus = mdiobus_alloc();
287 if (NULL == new_bus) 287 if (!new_bus) {
288 err = -ENOMEM;
288 goto err_free_priv; 289 goto err_free_priv;
290 }
289 291
290 new_bus->name = "Freescale PowerQUICC MII Bus", 292 new_bus->name = "Freescale PowerQUICC MII Bus",
291 new_bus->read = &fsl_pq_mdio_read, 293 new_bus->read = &fsl_pq_mdio_read,