public inbox for linux-next@vger.kernel.org
 help / color / mirror / Atom feed
* Coverity: gpmc_is_valid_waitpin(): Control flow issues
@ 2022-11-04 19:33 coverity-bot
  2022-11-07  8:53 ` Roger Quadros
  0 siblings, 1 reply; 7+ messages in thread
From: coverity-bot @ 2022-11-04 19:33 UTC (permalink / raw)
  To: Benedikt Niedermayr
  Cc: Krzysztof Kozlowski, linux-kernel, Tony Lindgren, Roger Quadros,
	linux-omap, Gustavo A. R. Silva, linux-next, linux-hardening

Hello!

This is an experimental semi-automated report about issues detected by
Coverity from a scan of next-20221104 as part of the linux-next scan project:
https://scan.coverity.com/projects/linux-next-weekly-scan

You're getting this email because you were associated with the identified
lines of code (noted below) that were touched by commits:

  Wed Nov 2 10:02:39 2022 -0400
    89aed3cd5cb9 ("memory: omap-gpmc: wait pin additions")

Coverity reported the following:

*** CID 1527139:  Control flow issues  (NO_EFFECT)
drivers/memory/omap-gpmc.c:1048 in gpmc_is_valid_waitpin()
1042     	spin_unlock(&gpmc_mem_lock);
1043     }
1044     EXPORT_SYMBOL(gpmc_cs_free);
1045
1046     static bool gpmc_is_valid_waitpin(u32 waitpin)
1047     {
vvv     CID 1527139:  Control flow issues  (NO_EFFECT)
vvv     This greater-than-or-equal-to-zero comparison of an unsigned value is always true. "waitpin >= 0U".
1048     	return waitpin >= 0 && waitpin < gpmc_nr_waitpins;
1049     }
1050
1051     static int gpmc_alloc_waitpin(struct gpmc_device *gpmc,
1052     			      struct gpmc_settings *p)
1053     {

If this is a false positive, please let us know so we can mark it as
such, or teach the Coverity rules to be smarter. If not, please make
sure fixes get into linux-next. :) For patches fixing this, please
include these lines (but double-check the "Fixes" first):

Reported-by: coverity-bot <keescook+coverity-bot@chromium.org>
Addresses-Coverity-ID: 1527139 ("Control flow issues")
Fixes: 89aed3cd5cb9 ("memory: omap-gpmc: wait pin additions")

Thanks for your attention!

-- 
Coverity-bot

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2022-11-08  9:40 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-11-04 19:33 Coverity: gpmc_is_valid_waitpin(): Control flow issues coverity-bot
2022-11-07  8:53 ` Roger Quadros
2022-11-07  8:56   ` Roger Quadros
2022-11-08  8:02     ` Niedermayr, BENEDIKT
2022-11-08  8:15       ` Niedermayr, BENEDIKT
2022-11-08  9:40         ` Krzysztof Kozlowski
2022-11-08  9:39       ` Krzysztof Kozlowski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox