Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754162AbbKQQTp (ORCPT ); Tue, 17 Nov 2015 11:19:45 -0500 Received: from lists.s-osg.org ([54.187.51.154]:58044 "EHLO lists.s-osg.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752301AbbKQQTn (ORCPT ); Tue, 17 Nov 2015 11:19:43 -0500 Subject: Re: [PATCH] ieee802154-atusb: Delete an unnecessary check before the function call "kfree_skb" To: 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> <5649D2AE.60100@users.sourceforge.net> <5649DE40.6030405@osg.samsung.com> Cc: SF Markus Elfring , Alexander Aring , linux-wpan@vger.kernel.org, Network Development , LKML , kernel-janitors@vger.kernel.org, Julia Lawall From: Stefan Schmidt Message-ID: <564B539B.9080003@osg.samsung.com> Date: Tue, 17 Nov 2015 17:19:39 +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: Content-Type: text/plain; charset=windows-1252; 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: 1567 Lines: 44 Hello. On 17/11/15 15:01, Marcel Holtmann wrote: > 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. > Done. Resend the original message from my address but with the From line intact inside the patch. Please check if it really lists Markus as author when applying. Acked-by also resend as reply to the resend patch. 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/