Re: [PATCH][-next] net: macb: remove extraneous return when MACB_EXT_DESC is defined

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 04/07/2017 at 17:09, Colin King wrote:
> From: Colin Ian King <colin.king@xxxxxxxxxxxxx>
> 
> 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@xxxxxxxxxxxxx>

Acked-by: Nicolas Ferre <nicolas.ferre@xxxxxxxxxxxxx>

> ---
>  drivers/net/ethernet/cadence/macb_main.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/drivers/net/ethernet/cadence/macb_main.c b/drivers/net/ethernet/cadence/macb_main.c
> index 41e5711544fc..e69ebdd65658 100644
> --- a/drivers/net/ethernet/cadence/macb_main.c
> +++ b/drivers/net/ethernet/cadence/macb_main.c
> @@ -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;
>  }
> 


-- 
Nicolas Ferre
--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux