linux-next.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Coverity: pdr_register_listener(): Integer handling issues
@ 2020-04-13 16:23 coverity-bot
  0 siblings, 0 replies; only message in thread
From: coverity-bot @ 2020-04-13 16:23 UTC (permalink / raw)
  To: Sibi Sankar; +Cc: Bjorn Andersson, Gustavo A. R. Silva, linux-next

Hello!

This is an experimental automated report about issues detected by Coverity
from a scan of next-20200413 as part of the linux-next weekly 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:

  Thu Mar 12 17:38:40 2020 +0530
    fbe639b44a82 ("soc: qcom: Introduce Protection Domain Restart helpers")

Coverity reported the following:

*** CID 1461652:  Integer handling issues  (CONSTANT_EXPRESSION_RESULT)
/drivers/soc/qcom/pdr_interface.c: 158 in pdr_register_listener()
152     	if (resp.resp.result != QMI_RESULT_SUCCESS_V01) {
153     		pr_err("PDR: %s register listener failed: 0x%x\n",
154     		       pds->service_path, resp.resp.error);
155     		return ret;
156     	}
157
vvv     CID 1461652:  Integer handling issues  (CONSTANT_EXPRESSION_RESULT)
vvv     "(int)resp.curr_state < -2147483648 /* -((int)(~0U >> 1)) - 1 */" is always false regardless of the values of its operands. This occurs as the logical first operand of "||".
158     	if ((int)resp.curr_state < INT_MIN || (int)resp.curr_state > INT_MAX)
159     		pr_err("PDR: %s notification state invalid: 0x%x\n",
160     		       pds->service_path, resp.curr_state);
161
162     	pds->state = resp.curr_state;
163

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: 1461652 ("Integer handling issues")
Fixes: fbe639b44a82 ("soc: qcom: Introduce Protection Domain Restart helpers")

Thanks for your attention!

-- 
Coverity-bot

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-04-13 16:23 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-13 16:23 Coverity: pdr_register_listener(): Integer handling issues coverity-bot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).