Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753732AbbKQOBd (ORCPT ); Tue, 17 Nov 2015 09:01:33 -0500 Received: from [82.165.8.211] ([82.165.8.211]:56269 "EHLO mail.holtmann.org" rhost-flags-FAIL-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1750708AbbKQOBb convert rfc822-to-8bit (ORCPT ); Tue, 17 Nov 2015 09:01:31 -0500 Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 9.1 \(3096.5\)) Subject: Re: [PATCH] ieee802154-atusb: Delete an unnecessary check before the function call "kfree_skb" From: Marcel Holtmann In-Reply-To: <5649DE40.6030405@osg.samsung.com> Date: Tue, 17 Nov 2015 15:01:28 +0100 Cc: SF Markus Elfring , Alexander Aring , linux-wpan@vger.kernel.org, Network Development , LKML , kernel-janitors@vger.kernel.org, Julia Lawall Content-Transfer-Encoding: 8BIT Message-Id: References: <5307CAA2.8060406@users.sourceforge.net> <530A086E.8010901@users.sourceforge.net> <530A72AA.3000601@users.sourceforge.net> <530B5FB6.6010207@users.sourceforge.net> <530C5E18.1020800@users.sourceforge.net> <530CD2C4.4050903@users.sourceforge.net> <530CF8FF.8080600@users.sourceforge.net> <530DD06F.4090703@users.sourceforge.net> <5317A59D.4@users.sourceforge.net> <5649D2AE.60100@users.sourceforge.net> <5649DE40.6030405@osg.samsung.com> To: Stefan Schmidt X-Mailer: Apple Mail (2.3096.5) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1262 Lines: 40 Hi Stefan, >> The kfree_skb() function tests whether its argument is NULL and then >> returns immediately. Thus the test around the call is not needed. >> >> This issue was detected by using the Coccinelle software. >> >> Signed-off-by: Markus Elfring >> --- >> drivers/net/ieee802154/atusb.c | 3 +-- >> 1 file changed, 1 insertion(+), 2 deletions(-) >> >> diff --git a/drivers/net/ieee802154/atusb.c b/drivers/net/ieee802154/atusb.c >> index 199a94a..b1cd865 100644 >> --- a/drivers/net/ieee802154/atusb.c >> +++ b/drivers/net/ieee802154/atusb.c >> @@ -310,8 +310,7 @@ static void atusb_free_urbs(struct atusb *atusb) >> urb = usb_get_from_anchor(&atusb->idle_urbs); >> if (!urb) >> break; >> - if (urb->context) >> - kfree_skb(urb->context); >> + kfree_skb(urb->context); >> usb_free_urb(urb); >> } >> } > > Acked-by: Stefan Schmidt for some reason I am missing the original patch, can someone resend it please. Regards Marcel -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/