From: Luca Coelho <luca@coelho.fi>
To: linux-wireless@vger.kernel.org
Cc: Sharon Dvir <sharon.dvir@intel.com>,
Luca Coelho <luciano.coelho@intel.com>
Subject: [PATCH 2/4] iwlwifi: mvm: check if vif is NULL before using it
Date: Mon, 29 Aug 2016 22:39:52 +0300 [thread overview]
Message-ID: <1472499594-3369-2-git-send-email-luca@coelho.fi> (raw)
In-Reply-To: <1472499594-3369-1-git-send-email-luca@coelho.fi>
From: Sharon Dvir <sharon.dvir@intel.com>
wdev_to_ieee80211_vif() might return NULL.
Check that vif != NULL before dereferencing it.
Signed-off-by: Sharon Dvir <sharon.dvir@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
---
drivers/net/wireless/intel/iwlwifi/mvm/mvm.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h b/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h
index b4fc86d..6a615bb 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h
@@ -467,6 +467,8 @@ struct iwl_mvm_vif {
static inline struct iwl_mvm_vif *
iwl_mvm_vif_from_mac80211(struct ieee80211_vif *vif)
{
+ if (!vif)
+ return NULL;
return (void *)vif->drv_priv;
}
--
2.8.1
next prev parent reply other threads:[~2016-08-29 19:40 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-29 19:37 pull-request: iwlwifi 2016-08-29 Luca Coelho
2016-08-29 19:39 ` [PATCH 1/4] iwlwifi: mvm: consider P2p device type for firmware dump triggers Luca Coelho
2016-08-29 19:39 ` Luca Coelho [this message]
2016-08-29 19:39 ` [PATCH 3/4] iwlwifi: mvm: don't use ret when not initialised Luca Coelho
2016-08-29 19:39 ` [PATCH 4/4] iwlwifi: mvm: Advertise support for AP channel width change Luca Coelho
2016-09-01 14:13 ` pull-request: iwlwifi 2016-08-29 Kalle Valo
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=1472499594-3369-2-git-send-email-luca@coelho.fi \
--to=luca@coelho.fi \
--cc=linux-wireless@vger.kernel.org \
--cc=luciano.coelho@intel.com \
--cc=sharon.dvir@intel.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).