net: macb: remove extraneous return when MACB_EXT_DESC is defined
authorColin Ian King <colin.king@canonical.com>
Tue, 4 Jul 2017 15:09:59 +0000 (16:09 +0100)
committerDavid S. Miller <davem@davemloft.net>
Wed, 5 Jul 2017 08:09:36 +0000 (09:09 +0100)
When macro MACB_EXT_DESC is defined we end up with two identical
return statements and just one is sufficient. Remove the extra
return.

Detected by CoverityScan, CID#1449361 ("Structurally dead code")

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Acked-by: Nicolas Ferre <nicolas.ferre@microchip.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/cadence/macb_main.c

index 41e5711544fcb8eef85534d4beb0d7601c7e0db7..e69ebdd65658d0e147c6587a356b873f2f523c54 100644 (file)
@@ -146,7 +146,6 @@ static unsigned int macb_adj_dma_desc_idx(struct macb *bp, unsigned int desc_idx
        default:
                break;
        }
-       return desc_idx;
 #endif
        return desc_idx;
 }