Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752592AbbKPM5p (ORCPT ); Mon, 16 Nov 2015 07:57:45 -0500 Received: from mout.web.de ([212.227.17.11]:62907 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752425AbbKPM5h (ORCPT ); Mon, 16 Nov 2015 07:57:37 -0500 Subject: [PATCH] ieee802154-atusb: Delete an unnecessary check before the function call "kfree_skb" 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> To: Alexander Aring , Stefan Schmidt , linux-wpan@vger.kernel.org, netdev@vger.kernel.org Cc: LKML , kernel-janitors@vger.kernel.org, Julia Lawall From: SF Markus Elfring Message-ID: <5649D2AE.60100@users.sourceforge.net> Date: Mon, 16 Nov 2015 13:57:18 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0 MIME-Version: 1.0 In-Reply-To: <5317A59D.4@users.sourceforge.net> Content-Type: text/plain; charset=iso-8859-15 Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K0:JltC2wiqVR64KML6fTwuWCPlL2xc9kWkWiC29+aP4LERFqwGnQ+ 9DslfAKikphZkEyHJ6Xf5xLPW7N/uUAZkIt2FHs/LBBIC4WVMUnW9Z7nonMQ7H3lUA3ZaqI ISIYmstLOE22bYieCzLl1a9YaU/xSJpLRL8GejwLyyv/RitvqE2mtMx/vgcArNUif/fgOIB rOcVh+q/4WBrQRmH+/ixA== X-UI-Out-Filterresults: notjunk:1;V01:K0:sCzIbT+Sgts=:ZhZl6eelLSQUC/GSsAvWM9 PFIidhOzZCj2FIbo6UnPYxu0xROxbeupTYB8mB/jNHgBt0RV4dp93YtzilaQCisTw1iifLD8z Lk0VI1aV9z8CzLx0aI/J6hAfx53u13+S5mYEtSC0S2bXqSjnwS1Nuvut1E4rVi1o64aFBYk+e e4xcnyVqUM+lbuhaEL15a9ARtafQa+SzEsn7ndznVOYc5rz76l75FMgZAFLMR+TqzhgbkHQfj cxvU0j/GChE0EBsSWYWNey6h6TLKtaF4NJTvRNibVpgrVu6mrZCwb8BfWKWtBUWe3NRMIJGVH SpU6HTuTRtDMNIjGFYIvQKzWnsT5YvPtMRiOpRM2GYOMWJaVM2cyfuTa4oi+mSYMhp31QDsc/ v7EtNnKZVRzjTwnBqgVxd4L89+G8aRvjZPu9c2rl/s46Ql3Dk2p72GGWDgr8oOR3Mdiy5WfyA L4lzf/iLV3voc9OOiEq74T6HkJHohQcY8LOMW22EQEQm4du5Eh496JmwcE2uuAUjWcRlPs4E/ Sr21a4YY2BKm4620C/InkNT0OjO6CuF9TL4A2Y7QdZ+haOCHgudaeLNPePLL6pWylXURPzYJf pt1jut4n5+pUvDOkwJKlQ6bdnDeFcNDzTC5qPkfhjcfr2EZ4syI3CR6LDDLtYweUtGK5G89QF S9nDfneglZyh8iD41PxiQB1rDArzdSkmySCLR0Emla4SvZzUqE4NARaUj4tG1/NO1bQTIpxr3 tB/1aIl3E36kRc/+KJ6GP++5Wk/oCUdxg2veVxEXnpYSgFAlYbrzhUGmnMDmd7KZ3sBihQ0jo YEQb8ob Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1128 Lines: 35 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); } } -- 2.6.2 -- 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/