diff options
author | Markus Elfring <elfring@users.sourceforge.net> | 2019-08-22 10:20:10 +0200 |
---|---|---|
committer | Kalle Valo <kvalo@codeaurora.org> | 2019-10-15 07:27:02 +0200 |
commit | 868ad21496020ef83d41fdeed3b0a63de2a3caa5 (patch) | |
tree | d1be5a7469de177839796482e04a07d3c3c4e0e7 /drivers/net/wireless/st | |
parent | wireless: Remove call to memset after dma_alloc_coherent (diff) | |
download | linux-868ad21496020ef83d41fdeed3b0a63de2a3caa5.tar.xz linux-868ad21496020ef83d41fdeed3b0a63de2a3caa5.zip |
net/wireless: Delete unnecessary checks before the macro call “dev_kfree_skb”
The dev_kfree_skb() function performs also input parameter validation.
Thus the test around the shown calls is not needed.
This issue was detected by using the Coccinelle software.
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers/net/wireless/st')
-rw-r--r-- | drivers/net/wireless/st/cw1200/scan.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/net/wireless/st/cw1200/scan.c b/drivers/net/wireless/st/cw1200/scan.c index c46b044b7f7b..988581cc134b 100644 --- a/drivers/net/wireless/st/cw1200/scan.c +++ b/drivers/net/wireless/st/cw1200/scan.c @@ -120,8 +120,7 @@ int cw1200_hw_scan(struct ieee80211_hw *hw, ++priv->scan.n_ssids; } - if (frame.skb) - dev_kfree_skb(frame.skb); + dev_kfree_skb(frame.skb); mutex_unlock(&priv->conf_mutex); queue_work(priv->workqueue, &priv->scan.work); return 0; |