diff mbox series

[-next] nfc: st21nfca: remove unnecessary skb check before kfree_skb()

Message ID 20220318072728.2659578-1-yangyingliang@huawei.com (mailing list archive)
State Accepted
Commit 800c326bfa9cee38f0e173733ce9f93492c84c8b
Delegated to: Netdev Maintainers
Headers show
Series [-next] nfc: st21nfca: remove unnecessary skb check before kfree_skb() | expand

Checks

Context Check Description
netdev/fixes_present success Fixes tag not required for -next series
netdev/subject_prefix warning Target tree name not specified in the subject
netdev/cover_letter success Single patches do not need cover letters
netdev/patch_count success Link
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 0 this patch: 0
netdev/cc_maintainers warning 1 maintainers not CCed: weiyongjun1@huawei.com
netdev/build_clang success Errors and warnings before: 0 this patch: 0
netdev/module_param success Was 0 now: 0
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/verify_fixes success No Fixes tag
netdev/build_allmodconfig_warn success Errors and warnings before: 0 this patch: 0
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 9 lines checked
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0
netdev/tree_selection success Guessing tree name failed - patch did not apply

Commit Message

Yang Yingliang March 18, 2022, 7:27 a.m. UTC
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(-)

Comments

Krzysztof Kozlowski March 18, 2022, 8:59 a.m. UTC | #1
On 18/03/2022 08:27, Yang Yingliang wrote:
> 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(-)
> 


Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org>


Best regards,
Krzysztof
patchwork-bot+netdevbpf@kernel.org March 19, 2022, 4:50 a.m. UTC | #2
Hello:

This patch was applied to netdev/net-next.git (master)
by Jakub Kicinski <kuba@kernel.org>:

On Fri, 18 Mar 2022 15:27:28 +0800 you wrote:
> 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(-)

Here is the summary with links:
  - [-next] nfc: st21nfca: remove unnecessary skb check before kfree_skb()
    https://git.kernel.org/netdev/net-next/c/800c326bfa9c

You are awesome, thank you!
diff mbox series

Patch

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;
 }