From: "Arend van Spriel" <arend@broadcom.com>
To: "John W. Linville" <linville@tuxdriver.com>
Cc: "Linux Wireless List" <linux-wireless@vger.kernel.org>,
"Hante Meuleman" <meuleman@broadcom.com>,
"Arend van Spriel" <arend@broadcom.com>
Subject: [PATCH 2/5] brcmfmac: Check null pointer on brcmf_dev_reset.
Date: Fri, 8 Feb 2013 12:06:32 +0100 [thread overview]
Message-ID: <1360321595-31722-3-git-send-email-arend@broadcom.com> (raw)
In-Reply-To: <1360321595-31722-1-git-send-email-arend@broadcom.com>
From: Hante Meuleman <meuleman@broadcom.com>
When unloading it is possible that drvr is not null, but iflist[0]
is. So check iflist[0] pointer before using it.
Reviewed-by: Arend Van Spriel <arend@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Piotr Haber <phaber@broadcom.com>
Signed-off-by: Hante Meuleman <meuleman@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
---
drivers/net/wireless/brcm80211/brcmfmac/dhd_linux.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/net/wireless/brcm80211/brcmfmac/dhd_linux.c b/drivers/net/wireless/brcm80211/brcmfmac/dhd_linux.c
index db03d30..f90db57 100644
--- a/drivers/net/wireless/brcm80211/brcmfmac/dhd_linux.c
+++ b/drivers/net/wireless/brcm80211/brcmfmac/dhd_linux.c
@@ -842,7 +842,8 @@ void brcmf_dev_reset(struct device *dev)
if (drvr == NULL)
return;
- brcmf_fil_cmd_int_set(drvr->iflist[0], BRCMF_C_TERMINATED, 1);
+ if (drvr->iflist[0])
+ brcmf_fil_cmd_int_set(drvr->iflist[0], BRCMF_C_TERMINATED, 1);
}
void brcmf_detach(struct device *dev)
--
1.7.10.4
next prev parent reply other threads:[~2013-02-08 11:06 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-08 11:06 [PATCH 0/5] brcmfmac: fix usb device reset and debugging functions Arend van Spriel
2013-02-08 11:06 ` [PATCH 1/5] brcmfmac: use brcmf_if::bssidx as index in interface list Arend van Spriel
2013-02-08 11:06 ` Arend van Spriel [this message]
2013-02-08 11:06 ` [PATCH 3/5] brcmfmac: fix mmc host locking issue Arend van Spriel
2013-02-08 11:06 ` [PATCH 4/5] brcmfmac: turn clocks on when reading shared info Arend van Spriel
2013-02-08 11:06 ` [PATCH 5/5] brcmfmac: remove unnecessary locking in trap info processing Arend van Spriel
2013-02-08 13:51 ` [PATCH 0/5] brcmfmac: fix usb device reset and debugging functions Arend van Spriel
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=1360321595-31722-3-git-send-email-arend@broadcom.com \
--to=arend@broadcom.com \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
--cc=meuleman@broadcom.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).