public inbox for linux-next@vger.kernel.org
 help / color / mirror / Atom feed
* Coverity: qm_vf_q_assign(): Error handling issues
@ 2020-04-17 21:58 coverity-bot
  2020-04-18  3:54 ` Shukun Tan
  0 siblings, 1 reply; 2+ messages in thread
From: coverity-bot @ 2020-04-17 21:58 UTC (permalink / raw)
  To: Shukun Tan
  Cc: Zaibo Xu, Zhou Wang, Herbert Xu, Gustavo A. R. Silva, linux-next

Hello!

This is an experimental semi-automated report about issues detected by
Coverity from a scan of next-20200417 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:

  Thu Apr 2 14:53:02 2020 +0800
    cd1b7ae3435c ("crypto: hisilicon - unify SR-IOV related codes into QM")

Coverity reported the following:

*** CID 1492651:  Error handling issues  (CHECKED_RETURN)
/drivers/crypto/hisilicon/qm.c: 2317 in qm_vf_q_assign()
2311     	for (i = 1; i <= num_vfs; i++) {
2312     		if (i == num_vfs)
2313     			q_num += remain_q_num % num_vfs;
2314     		ret = hisi_qm_set_vft(qm, i, q_base, q_num);
2315     		if (ret) {
2316     			for (j = i; j > 0; j--)
vvv     CID 1492651:  Error handling issues  (CHECKED_RETURN)
vvv     Calling "hisi_qm_set_vft" without checking return value (as is done elsewhere 4 out of 5 times).
2317     				hisi_qm_set_vft(qm, j, 0, 0);
2318     			return ret;
2319     		}
2320     		q_base += q_num;
2321     	}
2322

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: 1492651 ("Error handling issues")
Fixes: cd1b7ae3435c ("crypto: hisilicon - unify SR-IOV related codes into QM")

Thanks for your attention!

-- 
Coverity-bot

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

end of thread, other threads:[~2020-04-18  3:54 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-04-17 21:58 Coverity: qm_vf_q_assign(): Error handling issues coverity-bot
2020-04-18  3:54 ` Shukun Tan

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