]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
ath10k: remove unnecessary code
authorGustavo A. R. Silva <garsilva@embeddedor.com>
Fri, 19 May 2017 08:54:00 +0000 (11:54 +0300)
committerKalle Valo <kvalo@qca.qualcomm.com>
Tue, 23 May 2017 15:24:32 +0000 (18:24 +0300)
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 <arend.vanspriel@broadcom.com>
Cc: Kalle Valo <kvalo@qca.qualcomm.com>
Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
drivers/net/wireless/ath/ath10k/wmi.c

index 6afc8d27f0d511e04ad399112fa4a837e7ca715b..0dbcc79d718e9b970280ecf59ae71ecec4bedd08 100644 (file)
@@ -5948,15 +5948,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))