diff options
Diffstat (limited to 'drivers/net/ethernet/ti/davinci_emac.c')
-rw-r--r-- | drivers/net/ethernet/ti/davinci_emac.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/net/ethernet/ti/davinci_emac.c b/drivers/net/ethernet/ti/davinci_emac.c index 794ac30a577b..4b2f54565f64 100644 --- a/drivers/net/ethernet/ti/davinci_emac.c +++ b/drivers/net/ethernet/ti/davinci_emac.c | |||
@@ -1009,7 +1009,7 @@ static void emac_rx_handler(void *token, int len, int status) | |||
1009 | int ret; | 1009 | int ret; |
1010 | 1010 | ||
1011 | /* free and bail if we are shutting down */ | 1011 | /* free and bail if we are shutting down */ |
1012 | if (unlikely(!netif_running(ndev) || !netif_carrier_ok(ndev))) { | 1012 | if (unlikely(!netif_running(ndev))) { |
1013 | dev_kfree_skb_any(skb); | 1013 | dev_kfree_skb_any(skb); |
1014 | return; | 1014 | return; |
1015 | } | 1015 | } |
@@ -1038,7 +1038,9 @@ static void emac_rx_handler(void *token, int len, int status) | |||
1038 | recycle: | 1038 | recycle: |
1039 | ret = cpdma_chan_submit(priv->rxchan, skb, skb->data, | 1039 | ret = cpdma_chan_submit(priv->rxchan, skb, skb->data, |
1040 | skb_tailroom(skb), GFP_KERNEL); | 1040 | skb_tailroom(skb), GFP_KERNEL); |
1041 | if (WARN_ON(ret < 0)) | 1041 | |
1042 | WARN_ON(ret == -ENOMEM); | ||
1043 | if (unlikely(ret < 0)) | ||
1042 | dev_kfree_skb_any(skb); | 1044 | dev_kfree_skb_any(skb); |
1043 | } | 1045 | } |
1044 | 1046 | ||
@@ -1600,8 +1602,9 @@ static int emac_dev_open(struct net_device *ndev) | |||
1600 | if (IS_ERR(priv->phydev)) { | 1602 | if (IS_ERR(priv->phydev)) { |
1601 | dev_err(emac_dev, "could not connect to phy %s\n", | 1603 | dev_err(emac_dev, "could not connect to phy %s\n", |
1602 | priv->phy_id); | 1604 | priv->phy_id); |
1605 | ret = PTR_ERR(priv->phydev); | ||
1603 | priv->phydev = NULL; | 1606 | priv->phydev = NULL; |
1604 | return PTR_ERR(priv->phydev); | 1607 | return ret; |
1605 | } | 1608 | } |
1606 | 1609 | ||
1607 | priv->link = 0; | 1610 | priv->link = 0; |