Skip to contentSkip to conversation

st/cw1200: cleanup the code a bit

PATCH In review Bernard Zhao 2 participants 2 messages May 17, 2022 – May 30, 2022

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 st/cw1200: cleanup the code a bit

Delete if NULL check before dev_kfree_skb call.
This change is to cleanup the code a bit.

---
 drivers/net/wireless/st/cw1200/bh.c | 10 ++--------
 1 file changed, 2 insertions(+), 8 deletions(-)
drivers/net/wireless/st/cw1200/bh.c +2 -8
index 10e019cddcc6..3b4ded2ac801 100644
@@ -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;
 }
 
Signature · 1 line
2.33.1
#1 lore raw

Re: wifi: cw1200: cleanup the code a bit

Quoted 4 lines · Bernard Zhao

Delete if NULL check before dev_kfree_skb call.
This change is to cleanup the code a bit.

Patch applied to wireless-next.git, thanks.

d092de2c28dc wifi: cw1200: cleanup the code a bit

Signature · 3 lines
https://patchwork.kernel.org/project/linux-wireless/patch/[email protected]/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches