mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-12 05:48:40 +00:00
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: Florian Fainelli <f.fainelli@gmail.com> Acked-by: Rafał Miłecki <zajec5@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
ec35b61ea5
commit
5571415c96
1 changed files with 0 additions and 2 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue