summaryrefslogtreecommitdiffstats
path: root/drivers/nfc
diff options
context:
space:
mode:
authorYang Yingliang <yangyingliang@huawei.com>2022-03-18 08:27:28 +0100
committerJakub Kicinski <kuba@kernel.org>2022-03-19 05:41:51 +0100
commit800c326bfa9cee38f0e173733ce9f93492c84c8b (patch)
treeec0eb2c4fc9ab4e3a0f7f3b8511a02240d78e2f9 /drivers/nfc
parentMerge branch '40GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/n... (diff)
downloadlinux-800c326bfa9cee38f0e173733ce9f93492c84c8b.tar.xz
linux-800c326bfa9cee38f0e173733ce9f93492c84c8b.zip
nfc: st21nfca: remove unnecessary skb check before kfree_skb()
The skb will be checked in kfree_skb(), so remove the outside check. Signed-off-by: Yang Yingliang <yangyingliang@huawei.com> Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org> Link: https://lore.kernel.org/r/20220318072728.2659578-1-yangyingliang@huawei.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers/nfc')
-rw-r--r--drivers/nfc/st21nfca/i2c.c3
1 files changed, 1 insertions, 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;
}