Commit 7dfd0dcc authored by huangjunxian's avatar huangjunxian Committed by Jakub Kicinski

net: ll_temac: delete unnecessary else branch

Cleaning some static warnings of unnecessary else branch.
Signed-off-by: default avatarhuangjunxian <huangjunxian6@hisilicon.com>
Signed-off-by: default avatarHaoyue Xu <xuhaoyue1@hisilicon.com>
Reviewed-by: default avatarHarini Katakam <harini.katakam@amd.com>
Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 42f5d4d0
...@@ -117,8 +117,8 @@ int temac_indirect_busywait(struct temac_local *lp) ...@@ -117,8 +117,8 @@ int temac_indirect_busywait(struct temac_local *lp)
spin_until_cond(hard_acs_rdy_or_timeout(lp, timeout)); spin_until_cond(hard_acs_rdy_or_timeout(lp, timeout));
if (WARN_ON(!hard_acs_rdy(lp))) if (WARN_ON(!hard_acs_rdy(lp)))
return -ETIMEDOUT; return -ETIMEDOUT;
else
return 0; return 0;
} }
/* /*
...@@ -307,11 +307,9 @@ static void temac_dma_bd_release(struct net_device *ndev) ...@@ -307,11 +307,9 @@ static void temac_dma_bd_release(struct net_device *ndev)
for (i = 0; i < lp->rx_bd_num; i++) { for (i = 0; i < lp->rx_bd_num; i++) {
if (!lp->rx_skb[i]) if (!lp->rx_skb[i])
break; break;
else { dma_unmap_single(ndev->dev.parent, lp->rx_bd_v[i].phys,
dma_unmap_single(ndev->dev.parent, lp->rx_bd_v[i].phys, XTE_MAX_JUMBO_FRAME_SIZE, DMA_FROM_DEVICE);
XTE_MAX_JUMBO_FRAME_SIZE, DMA_FROM_DEVICE); dev_kfree_skb(lp->rx_skb[i]);
dev_kfree_skb(lp->rx_skb[i]);
}
} }
if (lp->rx_bd_v) if (lp->rx_bd_v)
dma_free_coherent(ndev->dev.parent, dma_free_coherent(ndev->dev.parent,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment