From: Gustavo A. R. Silva Date: Fri, 19 May 2017 08:54:00 +0000 (+0300) Subject: ath10k: remove unnecessary code X-Git-Tag: accepted/tizen/unified/20230531.034423~16 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=082e5502bc738c0e09dd9eadf1c8ca916e56aa5f;p=platform%2Fkernel%2Flinux-amlogic.git ath10k: remove unnecessary code The array fields in struct wmi_start_scan_arg that are checked here are fixed size arrays so they can never be NULL. Addresses-Coverity-ID: 1260031 Cc: Arend Van Spriel Cc: Kalle Valo Signed-off-by: Gustavo A. R. Silva Signed-off-by: Kalle Valo [sw0312.kim: backport upstream commit 8c1f20815231 to resolve gcc-12 build issue] Signed-off-by: Seung-Woo Kim Change-Id: Ie7096cc6bd0bc8280c44bf124e49aa06e49b9bd9 --- diff --git a/drivers/net/wireless/ath/ath10k/wmi.c b/drivers/net/wireless/ath/ath10k/wmi.c index af3bc06b4aed..e635ea1affe9 100644 --- a/drivers/net/wireless/ath/ath10k/wmi.c +++ b/drivers/net/wireless/ath/ath10k/wmi.c @@ -5903,15 +5903,6 @@ static struct sk_buff *ath10k_wmi_10_4_op_gen_init(struct ath10k *ar) int ath10k_wmi_start_scan_verify(const struct wmi_start_scan_arg *arg) { - if (arg->ie_len && !arg->ie) - return -EINVAL; - if (arg->n_channels && !arg->channels) - return -EINVAL; - if (arg->n_ssids && !arg->ssids) - return -EINVAL; - if (arg->n_bssids && !arg->bssids) - return -EINVAL; - if (arg->ie_len > WLAN_SCAN_PARAMS_MAX_IE_LEN) return -EINVAL; if (arg->n_channels > ARRAY_SIZE(arg->channels))