ath10k: remove an unnecessary NULL check
authorDan Carpenter <dan.carpenter@oracle.com>
Thu, 20 Dec 2018 07:53:45 +0000 (09:53 +0200)
committerKalle Valo <kvalo@codeaurora.org>
Thu, 20 Dec 2018 17:06:40 +0000 (19:06 +0200)
The "survey" pointer is the address of an array element.  We know that
it can't be NULL so this check can be removed.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/ath/ath10k/wmi.c

index 9b41cec6d8879cb989af350f6292bec0b5301b3b..3d59d7d73f4b65680909d1d061da9833df657fd8 100644 (file)
@@ -2582,7 +2582,7 @@ static void ath10k_wmi_event_chan_info_unpaired(struct ath10k *ar,
 
        survey = &ar->survey[idx];
 
-       if (!params->mac_clk_mhz || !survey)
+       if (!params->mac_clk_mhz)
                return;
 
        memset(survey, 0, sizeof(*survey));