wil6210: Delete an unnecessary kfree() call in wil_tid_ampdu_rx_alloc()
authorMarkus Elfring <elfring@users.sourceforge.net>
Tue, 27 Aug 2019 14:39:02 +0000 (16:39 +0200)
committerKalle Valo <kvalo@codeaurora.org>
Wed, 4 Sep 2019 06:07:29 +0000 (09:07 +0300)
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>
drivers/net/wireless/ath/wil6210/rx_reorder.c

index 784239b..13246d2 100644 (file)
@@ -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;
        }