From: Nicolas Ferre Date: Sun, 14 Apr 2013 22:04:33 +0000 (+0000) Subject: net/macb: fix error return code in macb_probe() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=72ca820bdb06bd1fef56aad07e0e045260bddb4e;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git net/macb: fix error return code in macb_probe() Fix to return a negative error code from the error handling case instead of 0, as returned elsewhere in this function. Original-idea-by: Signed-off-by: Nicolas Ferre Signed-off-by: David S. Miller --- diff --git a/drivers/net/ethernet/cadence/macb.c b/drivers/net/ethernet/cadence/macb.c index 7fd0e3e977af..6be513deb17f 100644 --- a/drivers/net/ethernet/cadence/macb.c +++ b/drivers/net/ethernet/cadence/macb.c @@ -1602,9 +1602,9 @@ static int __init macb_probe(struct platform_device *pdev) goto err_out_free_irq; } - if (macb_mii_init(bp) != 0) { + err = macb_mii_init(bp); + if (err) goto err_out_unregister_netdev; - } platform_set_drvdata(pdev, dev);