All of lore.kernel.org
 help / color / mirror / Atom feed
From: Maya Erez <merez@codeaurora.org>
To: Kalle Valo <kvalo@codeaurora.org>
Cc: Dedy Lansky <dlansky@codeaurora.org>,
	linux-wireless@vger.kernel.org, wil6210@qti.qualcomm.com,
	Maya Erez <merez@codeaurora.org>
Subject: [PATCH 8/9] wil6210: check rx_buff_mgmt before accessing it
Date: Fri, 26 Apr 2019 18:43:36 +0300	[thread overview]
Message-ID: <1556293417-27097-9-git-send-email-merez@codeaurora.org> (raw)
In-Reply-To: <1556293417-27097-1-git-send-email-merez@codeaurora.org>

From: Dedy Lansky <dlansky@codeaurora.org>

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>
---
 drivers/net/wireless/ath/wil6210/txrx_edma.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/net/wireless/ath/wil6210/txrx_edma.c b/drivers/net/wireless/ath/wil6210/txrx_edma.c
index f37a205..6140db5 100644
--- a/drivers/net/wireless/ath/wil6210/txrx_edma.c
+++ b/drivers/net/wireless/ath/wil6210/txrx_edma.c
@@ -269,6 +269,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);
-- 
1.9.1


  parent reply	other threads:[~2019-04-26 15:49 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-26 15:43 [PATCH 0/9] wil6210 patches Maya Erez
2019-04-26 15:43 ` [PATCH 1/9] wil6210: fix spurious interrupts in 3-msi Maya Erez
2019-05-03  5:05   ` Kalle Valo
2019-04-26 15:43 ` [PATCH 2/9] wil6210: fix _desc access in __wil_tx_vring_tso Maya Erez
2019-04-26 15:43 ` [PATCH 3/9] wil6210: add printout of platform capabilities Maya Erez
2019-04-26 15:43 ` [PATCH 4/9] wil6210: add support for multiple sections in brd file Maya Erez
2019-04-26 15:43 ` [PATCH 5/9] wil6210: enhancements for descriptor and status ring debugfs Maya Erez
2019-04-26 15:43 ` [PATCH 6/9] wil6210: fix overwriting max_assoc_sta module param Maya Erez
2019-04-26 15:43 ` [PATCH 7/9] wil6210: fix missed MISC mbox interrupt Maya Erez
2019-04-26 15:43 ` Maya Erez [this message]
2019-04-26 15:43 ` [PATCH 9/9] wil6210: remove HALP for Talyn devices Maya Erez

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1556293417-27097-9-git-send-email-merez@codeaurora.org \
    --to=merez@codeaurora.org \
    --cc=dlansky@codeaurora.org \
    --cc=kvalo@codeaurora.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=wil6210@qti.qualcomm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.