Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5571415c authored by Florian Fainelli's avatar Florian Fainelli Committed by David S. Miller
Browse files

bgmac: propagate error codes in bgmac_probe()



bgmac_mii_register() and register_netdev() both return appropriate error
codes for the failures they would encounter, propagate this error code
instead of overriding the value with -ENOTSUPP which is not the correct
error code to return.

Signed-off-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
Acked-by: default avatarRafał Miłecki <zajec5@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent ec35b61e
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -1518,14 +1518,12 @@ static int bgmac_probe(struct bcma_device *core)
	err = bgmac_mii_register(bgmac);
	if (err) {
		bgmac_err(bgmac, "Cannot register MDIO\n");
		err = -ENOTSUPP;
		goto err_dma_free;
	}

	err = register_netdev(bgmac->net_dev);
	if (err) {
		bgmac_err(bgmac, "Cannot register net device\n");
		err = -ENOTSUPP;
		goto err_mii_unregister;
	}