ethernet: use IS_ERR_OR_NULL as much as possible
Subsystems (4)
PATCH 1/1 ethernet: use IS_ERR_OR_NULL as much as possible
From: Li RongQing <[email protected]>
Signed-off-by 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
@@ -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
@@ -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
David Miller
maintainernet-next is not open for submissions, please resubmit these changes when I open that tree back up.