diff options
Diffstat (limited to 'drivers/net/dsa')
-rw-r--r-- | drivers/net/dsa/b53/b53_mmap.c | 3 | ||||
-rw-r--r-- | drivers/net/dsa/bcm_sf2.c | 5 |
2 files changed, 4 insertions, 4 deletions
diff --git a/drivers/net/dsa/b53/b53_mmap.c b/drivers/net/dsa/b53/b53_mmap.c index 21f1068b0804..77ffc4312808 100644 --- a/drivers/net/dsa/b53/b53_mmap.c +++ b/drivers/net/dsa/b53/b53_mmap.c @@ -233,8 +233,7 @@ static int b53_mmap_probe(struct platform_device *pdev) if (!dev) return -ENOMEM; - if (pdata) - dev->pdata = pdata; + dev->pdata = pdata; platform_set_drvdata(pdev, dev); diff --git a/drivers/net/dsa/bcm_sf2.c b/drivers/net/dsa/bcm_sf2.c index cd1d630ae3a9..b2b838724a9b 100644 --- a/drivers/net/dsa/bcm_sf2.c +++ b/drivers/net/dsa/bcm_sf2.c @@ -1622,7 +1622,7 @@ static int bcm_sf2_sw_setup(struct dsa_switch *ds) "switch_0", priv); if (ret < 0) { pr_err("failed to request switch_0 IRQ\n"); - goto out_unmap; + goto out_mdio; } ret = request_irq(priv->irq1, bcm_sf2_switch_1_isr, 0, @@ -1679,6 +1679,8 @@ static int bcm_sf2_sw_setup(struct dsa_switch *ds) out_free_irq0: free_irq(priv->irq0, priv); +out_mdio: + bcm_sf2_mdio_unregister(priv); out_unmap: base = &priv->core; for (i = 0; i < BCM_SF2_REGS_NUM; i++) { @@ -1686,7 +1688,6 @@ out_unmap: iounmap(*base); base++; } - bcm_sf2_mdio_unregister(priv); return ret; } |