From: Wei Yongjun Date: Fri, 22 Mar 2013 03:17:47 +0000 (+0000) Subject: s6gmac: fix error return code in s6gmac_probe() X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=43d6869037d6fa8f92a7a7e6df3b48147c8a3ef9;p=linux-beck.git s6gmac: fix error return code in s6gmac_probe() Fix to return a negative error code from the error handling case instead of 0, as returned elsewhere in this function. Signed-off-by: Wei Yongjun Signed-off-by: David S. Miller --- diff --git a/drivers/net/ethernet/s6gmac.c b/drivers/net/ethernet/s6gmac.c index cd5f4e21cede..b6739afeaca1 100644 --- a/drivers/net/ethernet/s6gmac.c +++ b/drivers/net/ethernet/s6gmac.c @@ -998,6 +998,7 @@ static int s6gmac_probe(struct platform_device *pdev) mb = mdiobus_alloc(); if (!mb) { printk(KERN_ERR DRV_PRMT "error allocating mii bus\n"); + res = -ENOMEM; goto errmii; } mb->name = "s6gmac_mii";