linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Arend van Spriel" <arend@broadcom.com>
To: "John W. Linville" <linville@tuxdriver.com>
Cc: linux-wireless@vger.kernel.org, "Arend van Spriel" <arend@broadcom.com>
Subject: [PATCH 06/13] brcmfmac: remove null-pointer check in .sched_scan_start() callback
Date: Sun, 3 Mar 2013 12:45:25 +0100	[thread overview]
Message-ID: <1362311132-29561-7-git-send-email-arend@broadcom.com> (raw)
In-Reply-To: <1362311132-29561-1-git-send-email-arend@broadcom.com>

In brcmf_cfg80211_sched_scan_start() the request parameter was checked
for being non-null. However, it never is so remove the check which gets
rid of following smatch warning:

drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c:2904
brcmf_cfg80211_sched_scan_start()
warn: variable dereferenced before check 'request' (see line 2897)

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Hante Meuleman <meuleman@broadcom.com>
Reviewed-by: Piotr Haber <phaber@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
---
 .../net/wireless/brcm80211/brcmfmac/wl_cfg80211.c  |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c b/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c
index 73f5528..d6f8c1a 100644
--- a/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c
+++ b/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c
@@ -3054,16 +3054,16 @@ brcmf_cfg80211_sched_scan_start(struct wiphy *wiphy,
 	int i;
 	int ret = 0;
 
-	brcmf_dbg(SCAN, "Enter n_match_sets:%d   n_ssids:%d\n",
+	brcmf_dbg(SCAN, "Enter n_match_sets:%d n_ssids:%d\n",
 		  request->n_match_sets, request->n_ssids);
 	if (test_bit(BRCMF_SCAN_STATUS_BUSY, &cfg->scan_status)) {
 		brcmf_err("Scanning already: status (%lu)\n", cfg->scan_status);
 		return -EAGAIN;
 	}
 
-	if (!request || !request->n_ssids || !request->n_match_sets) {
+	if (!request->n_ssids || !request->n_match_sets) {
 		brcmf_err("Invalid sched scan req!! n_ssids:%d\n",
-			  request ? request->n_ssids : 0);
+			  request->n_ssids);
 		return -EINVAL;
 	}
 
-- 
1.7.6



  parent reply	other threads:[~2013-03-03 11:45 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-03 11:45 [PATCH 00/13] brcm80211: cleanup and rework changes Arend van Spriel
2013-03-03 11:45 ` [PATCH 01/13] brcmsmac: radio on led support Arend van Spriel
2013-03-03 11:45 ` [PATCH 02/13] brcmfmac: introduce tracepoints for message logging Arend van Spriel
2013-03-03 11:45 ` [PATCH 03/13] brcmfmac: make debug module parameter more clear Arend van Spriel
2013-03-03 11:45 ` [PATCH 04/13] brcmfmac: cleanup module information macros Arend van Spriel
2013-03-03 11:45 ` [PATCH 05/13] brcmfmac: only do auth_type workaround when no WPA or RSN IE is provided Arend van Spriel
2013-03-03 17:20   ` Johannes Berg
2013-03-03 19:47     ` Arend van Spriel
2013-03-03 20:35       ` Johannes Berg
2013-03-04  8:29         ` Arend van Spriel
2013-03-03 11:45 ` Arend van Spriel [this message]
2013-03-03 11:45 ` [PATCH 07/13] brcmfmac: increase required skbuff headroom for firmware signalling Arend van Spriel
2013-03-03 11:45 ` [PATCH 08/13] brcmutil: add macros for setting bitfields using mask/shift operations Arend van Spriel
2013-03-03 11:45 ` [PATCH 09/13] brcmfmac: add support for TLV based firmware signalling Arend van Spriel
2013-03-03 11:45 ` [PATCH 10/13] brcmfmac: release transmit packet in brcmf_txcomplete() Arend van Spriel
2013-03-03 11:45 ` [PATCH 11/13] brcmfmac: assure brcmf_txcomplete() is called in failure paths Arend van Spriel
2013-03-03 11:45 ` [PATCH 12/13] brcmutil: add dequeue function with filtering Arend van Spriel
2013-03-03 11:45 ` [PATCH 13/13] brcmfmac: add parameter to brcmf_proto_hdrpush() for data offset 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=1362311132-29561-7-git-send-email-arend@broadcom.com \
    --to=arend@broadcom.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.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).