summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBernard Zhao <bernard@vivo.com>2022-05-16 18:41:36 -0700
committerKalle Valo <kvalo@kernel.org>2022-05-30 11:29:15 +0300
commitd092de2c28dcf752890252dedefed98f00a631fe (patch)
tree7176f2eadc125201248ace2fb432fa044f9cffaa
parent805cb5aadc2a88c453cfe620b28e12ff2fac27a6 (diff)
downloadlinux-next-d092de2c28dcf752890252dedefed98f00a631fe.tar.gz
wifi: cw1200: cleanup the code a bit
Delete if NULL check before dev_kfree_skb call. This change is to cleanup the code a bit. Signed-off-by: Bernard Zhao <bernard@vivo.com> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://lore.kernel.org/r/20220517014136.410450-1-bernard@vivo.com
-rw-r--r--drivers/net/wireless/st/cw1200/bh.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/drivers/net/wireless/st/cw1200/bh.c b/drivers/net/wireless/st/cw1200/bh.c
index 10e019cddcc6..3b4ded2ac801 100644
--- a/drivers/net/wireless/st/cw1200/bh.c
+++ b/drivers/net/wireless/st/cw1200/bh.c
@@ -327,18 +327,12 @@ static int cw1200_bh_rx_helper(struct cw1200_common *priv,
if (WARN_ON(wsm_handle_rx(priv, wsm_id, wsm, &skb_rx)))
goto err;
- if (skb_rx) {
- dev_kfree_skb(skb_rx);
- skb_rx = NULL;
- }
+ dev_kfree_skb(skb_rx);
return 0;
err:
- if (skb_rx) {
- dev_kfree_skb(skb_rx);
- skb_rx = NULL;
- }
+ dev_kfree_skb(skb_rx);
return -1;
}