From: Yang Yingliang <yangyingliang@huawei.com>
To: <linux-kernel@vger.kernel.org>
Cc: <netdev@vger.kernel.org>, <colin.king@intel.com>,
<kuba@kernel.org>, <davem@davemloft.net>, <krzk@kernel.org>
Subject: [PATCH -next] nfc: st21nfca: remove unnecessary skb check before kfree_skb()
Date: Fri, 18 Mar 2022 15:27:28 +0800 [thread overview]
Message-ID: <20220318072728.2659578-1-yangyingliang@huawei.com> (raw)
The skb will be checked in kfree_skb(), so remove the outside check.
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
---
drivers/nfc/st21nfca/i2c.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/nfc/st21nfca/i2c.c b/drivers/nfc/st21nfca/i2c.c
index a86b5edfc7ce..42dc0e5eb161 100644
--- a/drivers/nfc/st21nfca/i2c.c
+++ b/drivers/nfc/st21nfca/i2c.c
@@ -570,8 +570,7 @@ static int st21nfca_hci_i2c_remove(struct i2c_client *client)
if (phy->powered)
st21nfca_hci_i2c_disable(phy);
- if (phy->pending_skb)
- kfree_skb(phy->pending_skb);
+ kfree_skb(phy->pending_skb);
return 0;
}
--
2.25.1
next reply other threads:[~2022-03-18 7:18 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-18 7:27 Yang Yingliang [this message]
2022-03-18 8:59 ` krzk
2022-03-19 4:50 ` patchwork-bot+netdevbpf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220318072728.2659578-1-yangyingliang@huawei.com \
--to=yangyingliang@huawei.com \
--cc=colin.king@intel.com \
--cc=davem@davemloft.net \
--cc=krzk@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®