From: Dan Carpenter Date: Thu, 20 Dec 2018 07:53:45 +0000 (+0200) Subject: ath10k: remove an unnecessary NULL check X-Git-Tag: v5.0-rc1~129^2~19^2^2~7 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=27120f2ac995d83fef383fb20e492037ecf09259;p=users%2Fjedix%2Flinux-maple.git ath10k: remove an unnecessary NULL check 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 Signed-off-by: Kalle Valo --- diff --git a/drivers/net/wireless/ath/ath10k/wmi.c b/drivers/net/wireless/ath/ath10k/wmi.c index 9b41cec6d887..3d59d7d73f4b 100644 --- a/drivers/net/wireless/ath/ath10k/wmi.c +++ b/drivers/net/wireless/ath/ath10k/wmi.c @@ -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));