net: freescale: dpaa: simplify the return dpaa_eth_refill_bpools()
authorZheng Yongjun <zhengyongjun3@huawei.com>
Wed, 9 Dec 2020 09:21:07 +0000 (17:21 +0800)
committerDavid S. Miller <davem@davemloft.net>
Thu, 10 Dec 2020 01:05:37 +0000 (17:05 -0800)
Simplify the return expression.

Signed-off-by: Zheng Yongjun <zhengyongjun3@huawei.com>
Acked-by: Madalin Bucur <madalin.bucur@oss.nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/freescale/dpaa/dpaa_eth.c

index e28510c282e5f9e17a5781c77dc63bd8ec864212..4360ce4d3fb6a1a9a4be2796a01c848f479251db 100644 (file)
@@ -1625,17 +1625,13 @@ static int dpaa_eth_refill_bpools(struct dpaa_priv *priv)
 {
        struct dpaa_bp *dpaa_bp;
        int *countptr;
-       int res;
 
        dpaa_bp = priv->dpaa_bp;
        if (!dpaa_bp)
                return -EINVAL;
        countptr = this_cpu_ptr(dpaa_bp->percpu_count);
-       res  = dpaa_eth_refill_bpool(dpaa_bp, countptr);
-       if (res)
-               return res;
 
-       return 0;
+       return dpaa_eth_refill_bpool(dpaa_bp, countptr);
 }
 
 /* Cleanup function for outgoing frame descriptors that were built on Tx path,