]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
wil6210: check rx_buff_mgmt before accessing it
authorDedy Lansky <dlansky@codeaurora.org>
Fri, 26 Apr 2019 15:43:36 +0000 (18:43 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 21 Apr 2020 07:03:12 +0000 (09:03 +0200)
commit d6a553c0c61b0b0219764e4d4fc14e385085f374 upstream.

Make sure rx_buff_mgmt is initialized before accessing it.

Signed-off-by: Dedy Lansky <dlansky@codeaurora.org>
Signed-off-by: Maya Erez <merez@codeaurora.org>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/wireless/ath/wil6210/txrx_edma.c

index 5fa8d6ad66482641be406201d091e4564bd22b4b..03d0e6c550b98ed865e1bf424b7ea644e2d6e8a0 100644 (file)
@@ -268,6 +268,9 @@ static void wil_move_all_rx_buff_to_free_list(struct wil6210_priv *wil,
        struct list_head *active = &wil->rx_buff_mgmt.active;
        dma_addr_t pa;
 
+       if (!wil->rx_buff_mgmt.buff_arr)
+               return;
+
        while (!list_empty(active)) {
                struct wil_rx_buff *rx_buff =
                        list_first_entry(active, struct wil_rx_buff, list);