Skip to contentSkip to conversation

ethernet: use IS_ERR_OR_NULL as much as possible

PATCH In review [email protected] 2 participants 2 messages Dec 19, 2014

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

PATCH 1/1 ethernet: use IS_ERR_OR_NULL as much as possible

From: Li RongQing <[email protected]>

---
 drivers/net/ethernet/broadcom/tg3.c  | 2 +-
 drivers/net/ethernet/realtek/r8169.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/net/ethernet/broadcom/tg3.c +1 -1
index bb48a61..2e6e504 100644
@@ -7858,7 +7858,7 @@ static int tg3_tso_bug(struct tg3 *tp, struct tg3_napi *tnapi,
 
 	segs = skb_gso_segment(skb, tp->dev->features &
 				    ~(NETIF_F_TSO | NETIF_F_TSO6));
-	if (IS_ERR(segs) || !segs)
+	if (IS_ERR_OR_NULL(segs))
 		goto tg3_tso_bug_end;
 
 	do {
drivers/net/ethernet/realtek/r8169.c +1 -1
index 14a1c5c..254dbe4 100644
@@ -6876,7 +6876,7 @@ static void r8169_csum_workaround(struct rtl8169_private *tp,
 
 		features &= ~(NETIF_F_SG | NETIF_F_IPV6_CSUM | NETIF_F_TSO6);
 		segs = skb_gso_segment(skb, features);
-		if (IS_ERR(segs) || !segs)
+		if (IS_ERR_OR_NULL(segs))
 			goto drop;
 
 		do {
Signature · 1 line
2.1.0
maintainer
#1 lore raw

net-next is not open for submissions, please resubmit these changes when I open that tree back up.