Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Wei Yongjun and committed by
David S. Miller
43d68690 d6a8c36d

+1
+1
drivers/net/ethernet/s6gmac.c
··· 998 998 mb = mdiobus_alloc(); 999 999 if (!mb) { 1000 1000 printk(KERN_ERR DRV_PRMT "error allocating mii bus\n"); 1001 + res = -ENOMEM; 1001 1002 goto errmii; 1002 1003 } 1003 1004 mb->name = "s6gmac_mii";