diff mbox series

st/cw1200: cleanup the code a bit

Message ID 20220517014136.410450-1-bernard@vivo.com
State New
Headers show
Series st/cw1200: cleanup the code a bit | expand

Commit Message

Bernard Zhao May 17, 2022, 1:41 a.m. UTC
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>
---
 drivers/net/wireless/st/cw1200/bh.c | 10 ++--------
 1 file changed, 2 insertions(+), 8 deletions(-)

Comments

Kalle Valo May 30, 2022, 8:30 a.m. UTC | #1
Bernard Zhao <bernard@vivo.com> wrote:

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

Patch applied to wireless-next.git, thanks.

d092de2c28dc wifi: cw1200: cleanup the code a bit
diff mbox series

Patch

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