From: Tim Gardner Date: Fri, 7 Dec 2012 13:28:34 +0000 (-0700) Subject: iwlwifi: iwlagn_request_scan: Fix check for priv->scan_request X-Git-Tag: omap-for-v3.8/fixes-for-merge-window-v4-signed~45^2~17^2~1^2~2 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8907a6fb6281a9aa25df2c7e2996cedcd6e5559f;p=pandora-kernel.git iwlwifi: iwlagn_request_scan: Fix check for priv->scan_request The WARN_ON_ONCE() check for scan_request will not correctly detect a NULL pointer for scan_type == IWL_SCAN_NORMAL. Make it explicit that the check only applies to normal scans. Convert WARN_ON_ONCE to WARN_ON since priv->scan_request really _can't_ be NULL for normal scans. If it is then we should emit frequent warnings. This smatch warning led to scrutiny of iwlagn_request_scan(): drivers/net/wireless/iwlwifi/dvm/scan.c:894 iwlagn_request_scan() error: we previously assumed 'priv->scan_request' could be null (see line 792) Signed-off-by: Tim Gardner Reviewed-by: Emmanuel Grumbach Signed-off-by: Johannes Berg --- Reading git-diff-tree failed