diff mbox

wl12xx: remove redundant null check on wl->scan.ssid

Message ID 1458318048-28184-1-git-send-email-colin.king@canonical.com (mailing list archive)
State Accepted
Delegated to: Kalle Valo
Headers show

Commit Message

Colin King March 18, 2016, 4:20 p.m. UTC
From: Colin Ian King <colin.king@canonical.com>

ssid is an array of u8, so it can never be null, so the null check on
wl->scan.ssid is redundant and can be removed.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 drivers/net/wireless/ti/wl12xx/scan.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Kalle Valo April 6, 2016, 6:40 p.m. UTC | #1
> From: Colin Ian King <colin.king@canonical.com>
> 
> ssid is an array of u8, so it can never be null, so the null check on
> wl->scan.ssid is redundant and can be removed.
> 
> Signed-off-by: Colin Ian King <colin.king@canonical.com>

Thanks, applied to wireless-drivers-next.git.

Kalle Valo
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/net/wireless/ti/wl12xx/scan.c b/drivers/net/wireless/ti/wl12xx/scan.c
index ebed13a..a0dfc59 100644
--- a/drivers/net/wireless/ti/wl12xx/scan.c
+++ b/drivers/net/wireless/ti/wl12xx/scan.c
@@ -149,7 +149,7 @@  static int wl1271_scan_send(struct wl1271 *wl, struct wl12xx_vif *wlvif,
 	else
 		cmd->params.band = WL1271_SCAN_BAND_5_GHZ;
 
-	if (wl->scan.ssid_len && wl->scan.ssid) {
+	if (wl->scan.ssid_len) {
 		cmd->params.ssid_len = wl->scan.ssid_len;
 		memcpy(cmd->params.ssid, wl->scan.ssid, wl->scan.ssid_len);
 	}