From patchwork Tue Aug 28 13:02:40 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Yongjun X-Patchwork-Id: 1381351 Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 5561FDF283 for ; Tue, 28 Aug 2012 13:02:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752109Ab2H1NCm (ORCPT ); Tue, 28 Aug 2012 09:02:42 -0400 Received: from mail-qa0-f53.google.com ([209.85.216.53]:47332 "EHLO mail-qa0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751550Ab2H1NCl (ORCPT ); Tue, 28 Aug 2012 09:02:41 -0400 Received: by qaas11 with SMTP id s11so2609045qaa.19 for ; Tue, 28 Aug 2012 06:02:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:cc:content-type; bh=SVj/iuUt7Mh2FMfQmGyPBH/vQLkUzRKkduI11GnqlPA=; b=07buRtXo8mAaOM9k7+owMZ8VeajRrcMNDZqMQM3wM1WQcQEE7vWbtD13K6Wobedty4 mYkTeJ78fjdjMAkn60yuy/j8neiIvWOjXA5DVjl+OFU7RdM+rjZa3ayQ6NLBWMdHAp/+ lMhW/qxH/rf9+ZdNQR9ekO7w1ypYTwkSfd5tVOZKmdMqZ4gP2nRyt7+7qePJly6CCtvZ YQnyoIDbFZYPl6Tfgs44cau/6/1oXFSMZVUoF/QClQcMUiveATvg1P92GO6rMY/ZGQNh wktlON9KR1g+ROOyj79ExagAGHVUY54aUAw/1ya2G/Bul73UtX+LazYaeyWiAdp5mbuT pLMQ== MIME-Version: 1.0 Received: by 10.229.106.84 with SMTP id w20mr8883183qco.1.1346158960680; Tue, 28 Aug 2012 06:02:40 -0700 (PDT) Received: by 10.229.146.194 with HTTP; Tue, 28 Aug 2012 06:02:40 -0700 (PDT) Date: Tue, 28 Aug 2012 21:02:40 +0800 Message-ID: Subject: [PATCH] NFC: remove pointless conditional before kfree_skb() From: Wei Yongjun To: lauro.venancio@openbossa.org, aloisio.almeida@openbossa.org, sameo@linux.intel.com, davem@davemloft.net Cc: yongjun_wei@trendmicro.com.cn, linux-wireless@vger.kernel.org, netdev@vger.kernel.org Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Wei Yongjun Remove pointless conditional before kfree_skb(). Signed-off-by: Wei Yongjun --- net/nfc/hci/shdlc.c | 3 +-- net/nfc/hci/core.c | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/net/nfc/hci/shdlc.c b/net/nfc/hci/shdlc.c index 6f840c1..52e5cbb 100644 --- a/net/nfc/hci/shdlc.c +++ b/net/nfc/hci/shdlc.c @@ -241,8 +241,7 @@ static void nfc_shdlc_rcv_i_frame(struct nfc_shdlc *shdlc, } exit: - if (skb) - kfree_skb(skb); + kfree_skb(skb); } static void nfc_shdlc_rcv_ack(struct nfc_shdlc *shdlc, int y_nr) diff --git a/net/nfc/hci/core.c b/net/nfc/hci/core.c index 1ac7b3f..35413cc 100644 --- a/net/nfc/hci/core.c +++ b/net/nfc/hci/core.c @@ -398,8 +398,7 @@ disconnect_all: nfc_hci_disconnect_all_gates(hdev); exit: - if (skb) - kfree_skb(skb); + kfree_skb(skb); return r; }