From: Markus Elfring Date: Tue, 27 Aug 2019 14:39:02 +0000 (+0200) Subject: wil6210: Delete an unnecessary kfree() call in wil_tid_ampdu_rx_alloc() X-Git-Tag: for-linus-2019-09-27~91^2~19^2^2~28 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=d20b1e6c830721972d833ae0b845d4c483f118ca;p=linux-block.git 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 Reviewed-by: Maya Erez Signed-off-by: Kalle Valo --- 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; }