Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753209AbbLJKOv (ORCPT ); Thu, 10 Dec 2015 05:14:51 -0500 Received: from lists.s-osg.org ([54.187.51.154]:58673 "EHLO lists.s-osg.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750960AbbLJKOr (ORCPT ); Thu, 10 Dec 2015 05:14:47 -0500 Subject: Re: [PATCH] ieee802154-atusb: Delete an unnecessary check before the function call "kfree_skb" To: Alexander Aring , linux-wpan@vger.kernel.org, netdev@vger.kernel.org, Marcel Holtmann 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> <564B5327.4010307@osg.samsung.com> <564B5344.1090200@osg.samsung.com> Cc: LKML , kernel-janitors@vger.kernel.org, Julia Lawall From: Stefan Schmidt Message-ID: <56695093.8080605@osg.samsung.com> Date: Thu, 10 Dec 2015 11:14:43 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <564B5344.1090200@osg.samsung.com> Content-Type: text/plain; charset=iso-8859-15; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1527 Lines: 48 Marcel, On 17/11/15 17:18, Stefan Schmidt wrote: > Hello. > > On 17/11/15 17:17, Stefan Schmidt wrote: >> From: Markus Elfring >> Date: Mon, 16 Nov 2015 13:50:23 +0100 >> >> 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 You got the original patch and my ACK on this one or would you prefer me to resend it again? regards Stefan Schmidt -- 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/