aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/iio
diff options
context:
space:
mode:
authorGustavo A. R. Silva <gustavo@embeddedor.com>2018-10-05 22:12:09 +0200
committerDavid S. Miller <davem@davemloft.net>2018-10-07 20:36:40 -0700
commit5fc7c12ffa7fe463c4da2295cdc199da9663dce5 (patch)
treee471860ebbf2100695a7786889c4de2dd4f171b9 /drivers/iio
parentMerge tag 'wireless-drivers-next-for-davem-2018-10-07' of git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-next (diff)
downloadlinux-dev-5fc7c12ffa7fe463c4da2295cdc199da9663dce5.tar.xz
linux-dev-5fc7c12ffa7fe463c4da2295cdc199da9663dce5.zip
bnxt_en: Remove unnecessary unsigned integer comparison and initialize variable
There is no need to compare *val.vu32* with < 0 because such variable is of type u32 (32 bits, unsigned), making it impossible to hold a negative value. Fix this by removing such comparison. Also, initialize variable *max_val* to -1, just in case it is not initialized to either BNXT_MSIX_VEC_MAX or BNXT_MSIX_VEC_MIN_MAX before using it in a comparison with val.vu32 at line 159: if (val.vu32 > max_val) Addresses-Coverity-ID: 1473915 ("Unsigned compared against 0") Addresses-Coverity-ID: 1473920 ("Uninitialized scalar variable") Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/iio')
0 files changed, 0 insertions, 0 deletions