netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH -next] nfc: st21nfca: remove unnecessary skb check before kfree_skb()
@ 2022-03-18  7:27 Yang Yingliang
  2022-03-18  8:59 ` krzk
  2022-03-19  4:50 ` patchwork-bot+netdevbpf
  0 siblings, 2 replies; 3+ messages in thread
From: Yang Yingliang @ 2022-03-18  7:27 UTC (permalink / raw)
  To: linux-kernel; +Cc: netdev, colin.king, kuba, davem, krzk

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


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-03-19  4:50 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-03-18  7:27 [PATCH -next] nfc: st21nfca: remove unnecessary skb check before kfree_skb() Yang Yingliang
2022-03-18  8:59 ` krzk
2022-03-19  4:50 ` patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).