summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarkus Elfring <elfring@users.sourceforge.net>2019-08-27 16:39:02 +0200
committerKalle Valo <kvalo@codeaurora.org>2019-09-04 09:07:29 +0300
commitd20b1e6c830721972d833ae0b845d4c483f118ca (patch)
tree6a0f941c7d4ccd1e6a12ab4e800af5a97cd91f84
parent9abe3e306eccdf23e482b3a6dde178311d592765 (diff)
wil6210: Delete an unnecessary kfree() call in wil_tid_ampdu_rx_alloc()
A null pointer would be passed to a call of the function “kfree” directly after a call of the function “kcalloc” failed at one place. Remove this superfluous function call. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> Reviewed-by: Maya Erez <merez@codeaurora.org> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
-rw-r--r--drivers/net/wireless/ath/wil6210/rx_reorder.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/drivers/net/wireless/ath/wil6210/rx_reorder.c b/drivers/net/wireless/ath/wil6210/rx_reorder.c
index 784239bcb3a6..13246d216803 100644
--- a/drivers/net/wireless/ath/wil6210/rx_reorder.c
+++ b/drivers/net/wireless/ath/wil6210/rx_reorder.c
@@ -260,7 +260,6 @@ struct wil_tid_ampdu_rx *wil_tid_ampdu_rx_alloc(struct wil6210_priv *wil,
r->reorder_buf =
kcalloc(size, sizeof(struct sk_buff *), GFP_KERNEL);
if (!r->reorder_buf) {
- kfree(r->reorder_buf);
kfree(r);
return NULL;
}