diff options
Diffstat (limited to 'drivers/net/ieee802154/fakehard.c')
-rw-r--r-- | drivers/net/ieee802154/fakehard.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/drivers/net/ieee802154/fakehard.c b/drivers/net/ieee802154/fakehard.c index 9ce854f43917..6cbc56ad9ff4 100644 --- a/drivers/net/ieee802154/fakehard.c +++ b/drivers/net/ieee802154/fakehard.c | |||
@@ -377,17 +377,20 @@ static int ieee802154fake_probe(struct platform_device *pdev) | |||
377 | 377 | ||
378 | err = wpan_phy_register(phy); | 378 | err = wpan_phy_register(phy); |
379 | if (err) | 379 | if (err) |
380 | goto out; | 380 | goto err_phy_reg; |
381 | 381 | ||
382 | err = register_netdev(dev); | 382 | err = register_netdev(dev); |
383 | if (err < 0) | 383 | if (err) |
384 | goto out; | 384 | goto err_netdev_reg; |
385 | 385 | ||
386 | dev_info(&pdev->dev, "Added ieee802154 HardMAC hardware\n"); | 386 | dev_info(&pdev->dev, "Added ieee802154 HardMAC hardware\n"); |
387 | return 0; | 387 | return 0; |
388 | 388 | ||
389 | out: | 389 | err_netdev_reg: |
390 | unregister_netdev(dev); | 390 | wpan_phy_unregister(phy); |
391 | err_phy_reg: | ||
392 | free_netdev(dev); | ||
393 | wpan_phy_free(phy); | ||
391 | return err; | 394 | return err; |
392 | } | 395 | } |
393 | 396 | ||