]> git.baikalelectronics.ru Git - kernel.git/commit
stmmac: handle allocation errors in setup functions
authorDan Carpenter <error27@gmail.com>
Thu, 22 Jul 2010 01:16:48 +0000 (01:16 +0000)
committerDavid S. Miller <davem@davemloft.net>
Thu, 22 Jul 2010 21:14:48 +0000 (14:14 -0700)
commit115ecbb11c2826e71d5f97863ff2c099f1887567
tree9978774f6e4f5b1fbcc2e6dd9e178e31f4c1a9e4
parentceb79ca93b79e7cf37cd9dc90866511933db98ba
stmmac: handle allocation errors in setup functions

If the allocations fail in either dwmac1000_setup() or dwmac100_setup()
then return NULL.  These are called from stmmac_mac_device_setup().  The
check for NULL returns in stmmac_mac_device_setup() needed to be moved
forward a couple lines.

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