diff options
author | huangjunxian <huangjunxian6@hisilicon.com> | 2022-09-17 18:38:40 +0800 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2022-09-21 18:25:19 -0700 |
commit | 7dfd0dcc5e728ccbbdb656356cb1a1112796e4da (patch) | |
tree | 50c0649793aff25d994a3ee1ee318c91124a78a6 /drivers/net | |
parent | 42f5d4d0e0d9bb7e4ff776412415d3894ac71ea4 (diff) | |
download | linux-7dfd0dcc5e728ccbbdb656356cb1a1112796e4da.tar.bz2 |
net: ll_temac: delete unnecessary else branch
Cleaning some static warnings of unnecessary else branch.
Signed-off-by: huangjunxian <huangjunxian6@hisilicon.com>
Signed-off-by: Haoyue Xu <xuhaoyue1@hisilicon.com>
Reviewed-by: Harini Katakam <harini.katakam@amd.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/ethernet/xilinx/ll_temac_main.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/drivers/net/ethernet/xilinx/ll_temac_main.c b/drivers/net/ethernet/xilinx/ll_temac_main.c index 586017792181..eadd275313a1 100644 --- a/drivers/net/ethernet/xilinx/ll_temac_main.c +++ b/drivers/net/ethernet/xilinx/ll_temac_main.c @@ -117,8 +117,8 @@ int temac_indirect_busywait(struct temac_local *lp) spin_until_cond(hard_acs_rdy_or_timeout(lp, timeout)); if (WARN_ON(!hard_acs_rdy(lp))) return -ETIMEDOUT; - else - return 0; + + return 0; } /* @@ -307,11 +307,9 @@ static void temac_dma_bd_release(struct net_device *ndev) for (i = 0; i < lp->rx_bd_num; i++) { if (!lp->rx_skb[i]) break; - else { - dma_unmap_single(ndev->dev.parent, lp->rx_bd_v[i].phys, - XTE_MAX_JUMBO_FRAME_SIZE, DMA_FROM_DEVICE); - dev_kfree_skb(lp->rx_skb[i]); - } + dma_unmap_single(ndev->dev.parent, lp->rx_bd_v[i].phys, + XTE_MAX_JUMBO_FRAME_SIZE, DMA_FROM_DEVICE); + dev_kfree_skb(lp->rx_skb[i]); } if (lp->rx_bd_v) dma_free_coherent(ndev->dev.parent, |