Browse Source

net/spider_net: fix error return code in spider_net_open()

Fix to return a negative error code from the error handling
case instead of 0, as done elsewhere in this function.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: David S. Miller <davem@davemloft.net>
Wei Yongjun 12 years ago
parent
commit
228fb087a0
1 changed files with 2 additions and 1 deletions
  1. 2 1
      drivers/net/ethernet/toshiba/spider_net.c

+ 2 - 1
drivers/net/ethernet/toshiba/spider_net.c

@@ -1990,7 +1990,8 @@ spider_net_open(struct net_device *netdev)
 		goto alloc_rx_failed;
 
 	/* Allocate rx skbs */
-	if (spider_net_alloc_rx_skbs(card))
+	result = spider_net_alloc_rx_skbs(card);
+	if (result)
 		goto alloc_skbs_failed;
 
 	spider_net_set_multi(netdev);