Skip to content

Commit

Permalink
nfc: st21nfca: remove unnecessary skb check before kfree_skb()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Yang Yingliang authored and Jakub Kicinski committed Mar 19, 2022
1 parent 49270af commit 800c326
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/nfc/st21nfca/i2c.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 800c326

Please sign in to comment.