Coverity: qm_vf_q_assign(): Error handling issues

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

Thanks for your attention!

-- 
Coverity-bot



[Index of Archives]     [Linux Kernel]     [Linux USB Development]     [Yosemite News]     [Linux SCSI]

  Powered by Linux