dpaa_eth: Fix comparing pointer to 0
Subsystems (3)
PATCH 1/1 dpaa_eth: Fix comparing pointer to 0
Fixes coccicheck warning:
./drivers/net/ethernet/freescale/dpaa/dpaa_eth.c:2110:30-31:
WARNING comparing pointer to 0
Avoid pointer type value compared to 0.
Signed-off-by Aishwarya Ramakrishnan <[email protected]>
--- drivers/net/ethernet/freescale/dpaa/dpaa_eth.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/freescale/dpaa/dpaa_eth.c +1 -1
@@ -2107,7 +2107,7 @@ static int dpaa_a050385_wa(struct net_device *net_dev, struct sk_buff **s)/* Workaround for DPAA_A050385 requires data start to be aligned */ start =PTR_ALIGN (new_skb->data,DPAA_A050385_ALIGN ); -if (start - new_skb->data !=0 ) +if (start - new_skb->data)skb_reserve (new_skb, start - new_skb->data);skb_put (new_skb, skb->len);
Signature · 1 line
2.17.1
From: Aishwarya Ramakrishnan <[email protected]>
Date: Mon, 27 Apr 2020 16:02:30 +0530
Quoted 7 lines
Fixes coccicheck warning:
./drivers/net/ethernet/freescale/dpaa/dpaa_eth.c:2110:30-31:
WARNING comparing pointer to 0Avoid pointer type value compared to 0.
Signed-off-by Aishwarya Ramakrishnan <[email protected]>
Applied, thanks.