From patchwork Sun Jul 27 07:08:38 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Himangi Saraogi X-Patchwork-Id: 373994 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id BCB4F14010F for ; Sun, 27 Jul 2014 17:09:02 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751574AbaG0HIs (ORCPT ); Sun, 27 Jul 2014 03:08:48 -0400 Received: from mail-pa0-f52.google.com ([209.85.220.52]:64619 "EHLO mail-pa0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751395AbaG0HIr (ORCPT ); Sun, 27 Jul 2014 03:08:47 -0400 Received: by mail-pa0-f52.google.com with SMTP id bj1so8511835pad.11 for ; Sun, 27 Jul 2014 00:08:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:mime-version:content-type :content-disposition:user-agent; bh=bb0RCmPaabWnMN5ExZoED9zwOivSTpNN9e18Y1LqAsY=; b=rDJt0ucPW2WlmY4WmRLvqFD7pk0QU0Nr9902vk9Je7o1XdTxqxtFXYRuyXIV266lGl F2IEDheSOHXFN15oYlbU5ZlVJuy+6V2BOGGx1oaeBmw/gv4uy/rUswaOJ8KJNWkCKuSc ngU0V/sfN8Tca04XWYEJp5MpKl5EfmIYOB3LKFEnqgQ6ITdcj3a+ZSKUMahkelmtT8fl xM2/aJ9Lplj77GZVL2Fhuodq6tLN19JpSsOstsm/Qs1EiP/F9314Yek2z43+uWZE6PWv aSprysnZcvnTnzu7yHqS38VNK02qifWmDagncAWqwN1w6LllKpst/O4dFtl+9h6sWUpR i41w== X-Received: by 10.68.139.225 with SMTP id rb1mr16171pbb.153.1406444927258; Sun, 27 Jul 2014 00:08:47 -0700 (PDT) Received: from localhost ([122.178.68.168]) by mx.google.com with ESMTPSA id pp2sm18478761pdb.59.2014.07.27.00.08.42 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Sun, 27 Jul 2014 00:08:46 -0700 (PDT) Date: Sun, 27 Jul 2014 12:38:38 +0530 From: Himangi Saraogi To: "David S. Miller" , Alexey Kuznetsov , James Morris , Hideaki YOSHIFUJI , Patrick McHardy , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Julia Lawall Subject: [PATCH] net/udp_offload: Use IS_ERR_OR_NULL Message-ID: <20140727070838.GA4866@himangi-Dell> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org This patch introduces the use of the macro IS_ERR_OR_NULL in place of tests for NULL and IS_ERR. The following Coccinelle semantic patch was used for making the change: @@ expression e; @@ - e == NULL || IS_ERR(e) + IS_ERR_OR_NULL(e) || ... Signed-off-by: Himangi Saraogi Acked-by: Julia Lawall --- net/ipv4/udp_offload.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/ipv4/udp_offload.c b/net/ipv4/udp_offload.c index 4807544..59035bc 100644 --- a/net/ipv4/udp_offload.c +++ b/net/ipv4/udp_offload.c @@ -79,7 +79,7 @@ struct sk_buff *skb_udp_tunnel_segment(struct sk_buff *skb, /* segment inner packet. */ enc_features = skb->dev->hw_enc_features & netif_skb_features(skb); segs = skb_mac_gso_segment(skb, enc_features); - if (!segs || IS_ERR(segs)) { + if (IS_ERR_OR_NULL(segs)) { skb_gso_error_unwind(skb, protocol, tnl_hlen, mac_offset, mac_len); goto out;