]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
mwifiex: ie_list is an array, so no need to check if NULL
authorColin Ian King <colin.king@canonical.com>
Mon, 28 Mar 2016 15:53:33 +0000 (16:53 +0100)
committerKalle Valo <kvalo@codeaurora.org>
Thu, 7 Apr 2016 16:39:18 +0000 (19:39 +0300)
ap_ie->ie_list is an array of struct mwifiex_ie and can never
be null, so the null check on this array is redundant and can
be removed.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/marvell/mwifiex/uap_cmd.c

index 16d95b22fe5c99a2803ceed9527e637c17e75b05..92ce32f5bb13ca4369ad8f4c8fd23e463c30897f 100644 (file)
@@ -694,7 +694,7 @@ static int mwifiex_uap_custom_ie_prepare(u8 *tlv, void *cmd_buf, u16 *ie_size)
        struct mwifiex_ie_list *ap_ie = cmd_buf;
        struct mwifiex_ie_types_header *tlv_ie = (void *)tlv;
 
-       if (!ap_ie || !ap_ie->len || !ap_ie->ie_list)
+       if (!ap_ie || !ap_ie->len)
                return -1;
 
        *ie_size += le16_to_cpu(ap_ie->len) +