Skip to contentSkip to conversation

dpaa_eth: Fix comparing pointer to 0

PATCH Applied Aishwarya Ramakrishnan 2 participants 2 messages Apr 27, 2020 – May 1, 2020

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

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.

---
 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
index 2cd1f8efdfa3..c4416a5f8816 100644
@@ -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