From: Yang Yingliang Date: Fri, 18 Mar 2022 07:27:28 +0000 (+0800) Subject: nfc: st21nfca: remove unnecessary skb check before kfree_skb() X-Git-Tag: v5.18-rc1~136^2~34 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=800c326bfa9cee38f0e173733ce9f93492c84c8b;p=thirdparty%2Fkernel%2Flinux.git 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 Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20220318072728.2659578-1-yangyingliang@huawei.com Signed-off-by: Jakub Kicinski --- diff --git a/drivers/nfc/st21nfca/i2c.c b/drivers/nfc/st21nfca/i2c.c index a86b5edfc7ce3..42dc0e5eb1610 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; }