Commit d092de2c authored by Bernard Zhao's avatar Bernard Zhao Committed by Kalle Valo

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: default avatarBernard Zhao <bernard@vivo.com>
Signed-off-by: default avatarKalle Valo <kvalo@kernel.org>
Link: https://lore.kernel.org/r/20220517014136.410450-1-bernard@vivo.com
parent 805cb5aa
......@@ -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;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment