diff options
author | Benedikt Niedermayr <benedikt.niedermayr@siemens.com> | 2022-11-09 11:24:54 +0100 |
---|---|---|
committer | Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> | 2022-11-10 11:04:07 +0100 |
commit | 8dd7e4af585331dda004e92ed0739c3609e37177 (patch) | |
tree | 1635cdd52337d87aadffa50390dae5a8f6b606d8 /drivers | |
parent | 1f1e46b83b7db08c8db31816c857e27da84d4ca3 (diff) | |
download | linux-8dd7e4af585331dda004e92ed0739c3609e37177.tar.gz linux-8dd7e4af585331dda004e92ed0739c3609e37177.tar.bz2 linux-8dd7e4af585331dda004e92ed0739c3609e37177.zip |
memory: omap-gpmc: fix coverity issue "Control flow issues"
Assign a big positive integer instead of an negative integer to an
u32 variable. Also remove the check for ">= 0" which doesn't make sense
for unsigned integers.
Reported-by: coverity-bot <keescook+coverity-bot@chromium.org>
Addresses-Coverity-ID: 1527139 ("Control flow issues")
Fixes: 89aed3cd5cb9 ("memory: omap-gpmc: wait pin additions")
Signed-off-by: Benedikt Niedermayr <benedikt.niedermayr@siemens.com>
Reviewed-by: Roger Quadros <rogerq@kernel.org>
Link: https://lore.kernel.org/r/20221109102454.174320-1-benedikt.niedermayr@siemens.com
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/memory/omap-gpmc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/memory/omap-gpmc.c b/drivers/memory/omap-gpmc.c index e427572712e2..57d9f91fe89b 100644 --- a/drivers/memory/omap-gpmc.c +++ b/drivers/memory/omap-gpmc.c @@ -1045,7 +1045,7 @@ EXPORT_SYMBOL(gpmc_cs_free); static bool gpmc_is_valid_waitpin(u32 waitpin) { - return waitpin >= 0 && waitpin < gpmc_nr_waitpins; + return waitpin < gpmc_nr_waitpins; } static int gpmc_alloc_waitpin(struct gpmc_device *gpmc, |