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)
commitbdfd6304c8e2439fc047fafccf05f145004260bd
tree4e9638f5b0d5dd27832f7ee76e18cc82d126bc3d
parentc33a39c575068c2ea9bffb22fd6de2df19c74b89
moxa: fix the error handling in moxart_mac_probe()

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