ath10k: remove redundant -ve check against u32 integer size
authorColin Ian King <colin.king@canonical.com>
Fri, 12 Jan 2018 17:27:13 +0000 (17:27 +0000)
committerKalle Valo <kvalo@codeaurora.org>
Tue, 16 Jan 2018 14:34:04 +0000 (16:34 +0200)
Variable section_table.size is a u32 and so cannot be less than
zero, hence the less than zero check is redundant and can be
removed.

Detected by CoverityScan, CID#1463855 ("Unsigned compared against 0")

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

index f6a23f2d03351773002832ea693ff0032feeec1f..355db6a0fcf3ee9ddc3213bece83da1004c36e4c 100644 (file)
@@ -1478,9 +1478,6 @@ static int ath10k_pci_dump_memory_section(struct ath10k *ar,
        if (!mem_region || !buf)
                return 0;
 
-       if (mem_region->section_table.size < 0)
-               return 0;
-
        cur_section = &mem_region->section_table.sections[0];
 
        if (mem_region->start > cur_section->start) {