net/cadence/macb: fix invalid 0 return if no phy is discovered on mii init
authorBoris BREZILLON <b.brezillon@overkiz.com>
Tue, 27 Aug 2013 12:36:14 +0000 (14:36 +0200)
committerDavid S. Miller <davem@davemloft.net>
Thu, 29 Aug 2013 19:21:45 +0000 (15:21 -0400)
commit7daa78e352fec0f638e1e665365779678845fd66
treecb11d42d763faf52ca47f20fb58fb5d5db148fc8
parentfd094808a06e290432fc13c09aae808aea34d2ca
net/cadence/macb: fix invalid 0 return if no phy is discovered on mii init

Replace misleading -1 (-EPERM) by a more appropriate return code (-ENXIO)
in macb_mii_probe function.
Save macb_mii_probe return before branching to err_out_unregister to avoid
erronous 0 return.

Signed-off-by: Boris BREZILLON <b.brezillon@overkiz.com>
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/cadence/macb.c