浏览代码

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 <yongjun_wei@trendmicro.com.cn>
Signed-off-by: David S. Miller <davem@davemloft.net>
Wei Yongjun 12 年之前
父节点
当前提交
43d6869037
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      drivers/net/ethernet/s6gmac.c

+ 1 - 0
drivers/net/ethernet/s6gmac.c

@@ -998,6 +998,7 @@ static int s6gmac_probe(struct platform_device *pdev)
 	mb = mdiobus_alloc();
 	mb = mdiobus_alloc();
 	if (!mb) {
 	if (!mb) {
 		printk(KERN_ERR DRV_PRMT "error allocating mii bus\n");
 		printk(KERN_ERR DRV_PRMT "error allocating mii bus\n");
+		res = -ENOMEM;
 		goto errmii;
 		goto errmii;
 	}
 	}
 	mb->name = "s6gmac_mii";
 	mb->name = "s6gmac_mii";