staging: wfx: Fix a memory leak in 'wfx_upload_beacon'

The current code is a no-op, because all it can do is 'dev_kfree_skb(NULL)'
Remove the test before 'dev_kfree_skb()'

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Link: https://lore.kernel.org/r/20191102155945.20205-1-christophe.jaillet@wanadoo.fr
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Christophe JAILLET
2019-11-02 16:59:45 +01:00
committed by Greg Kroah-Hartman
parent d3baf1e0b2
commit 1878c5b914

View File

@@ -906,8 +906,7 @@ static int wfx_upload_beacon(struct wfx_vif *wvif)
wfx_fwd_probe_req(wvif, false);
done:
if (!skb)
dev_kfree_skb(skb);
dev_kfree_skb(skb);
return ret;
}