aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/bfin_mac.c
diff options
context:
space:
mode:
authorMichael Hennerich <michael.hennerich@analog.com>2007-07-25 02:09:54 -0400
committerBryan Wu <bryan.wu@analog.com>2007-07-25 02:09:54 -0400
commit4af4b84088696777e222a5b0e3f55a81935bc9cc (patch)
tree3bb6005ab6729d3ffd1e19fcb05a120f0e9d64ed /drivers/net/bfin_mac.c
parent50e163ce8e3cb17d41367899fbf50a17e358cc89 (diff)
Blackfin Ethernet MAC driver: fix bug Report returned -ENOMEM upwards (in case L1/uncached memory alloc fails)
Bug tracker: https://blackfin.uclinux.org/gf/project/uclinux-dist/tracker/?action=TrackerItemEdit&tracker_item_id=3399 Signed-off-by: Michael Hennerich <michael.hennerich@analog.com> Signed-off-by: Bryan Wu <bryan.wu@analog.com>
Diffstat (limited to 'drivers/net/bfin_mac.c')
-rw-r--r--drivers/net/bfin_mac.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/net/bfin_mac.c b/drivers/net/bfin_mac.c
index 9a08d656f1ce..2bb97d464689 100644
--- a/drivers/net/bfin_mac.c
+++ b/drivers/net/bfin_mac.c
@@ -798,6 +798,7 @@ static void bf537mac_shutdown(struct net_device *dev)
798 */ 798 */
799static int bf537mac_open(struct net_device *dev) 799static int bf537mac_open(struct net_device *dev)
800{ 800{
801 int retval;
801 pr_debug("%s: %s\n", dev->name, __FUNCTION__); 802 pr_debug("%s: %s\n", dev->name, __FUNCTION__);
802 803
803 /* 804 /*
@@ -811,7 +812,10 @@ static int bf537mac_open(struct net_device *dev)
811 } 812 }
812 813
813 /* initial rx and tx list */ 814 /* initial rx and tx list */
814 desc_list_init(); 815 retval = desc_list_init();
816
817 if (retval)
818 return retval;
815 819
816 bf537mac_setphy(dev); 820 bf537mac_setphy(dev);
817 setup_system_regs(dev); 821 setup_system_regs(dev);