stmmac: unwind properly in stmmac_dvr_probe()
authorDan Carpenter <error27@gmail.com>
Mon, 20 Dec 2010 21:34:56 +0000 (21:34 +0000)
committerDavid S. Miller <davem@davemloft.net>
Tue, 21 Dec 2010 18:53:19 +0000 (10:53 -0800)
commit34a52f363ab6bcf6d50a65c153dec03f3fb32653
tree62a84a17730b64c692ac788354cb1ae6913087b3
parent4b97f8e10893e2c8f64a2795901bdb447a3308f4
stmmac: unwind properly in stmmac_dvr_probe()

The original code had a several problems:
*) It had potential null dereferences of "priv" and "res".
*) It released the memory region before it was aquired.
*) It didn't free "ndev" after it was allocated.
*) It didn't call unregister_netdev() after calling stmmac_probe().

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/stmmac/stmmac_main.c