moxa: fix the error handling in moxart_mac_probe()
authorWei Yongjun <yongjun_wei@trendmicro.com.cn>
Tue, 8 Oct 2013 03:19:19 +0000 (11:19 +0800)
committerDavid S. Miller <davem@davemloft.net>
Tue, 8 Oct 2013 20:33:50 +0000 (16:33 -0400)
This patch fix the error handling in moxart_mac_probe():
 - return -ENOMEM in some memory alloc fail cases
 - add missing free_netdev() in the error handling case

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/moxa/moxart_ether.c