Re: Coverity: sdhci_versal_sdcardclk_set_phase(): Uninitialized variables

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

 



Hi Kees,

On Fri, 17 Apr 2020 14:52:01 -0700 coverity-bot <keescook@xxxxxxxxxxxx> wrote:
>
> 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:
> 
>   Mon Apr 6 23:13:31 2020 +0530
>     f73e66a36772 ("sdhci: arasan: Add support for Versal Tap Delays")
> 
> Coverity reported the following:
> 
> *** CID 1492645:  Uninitialized variables  (UNINIT)
> /drivers/mmc/host/sdhci-of-arasan.c: 784 in sdhci_versal_sdcardclk_set_phase()
> 778     		regval |= SDHCI_OTAPDLY_ENABLE;
> 779     		sdhci_writel(host, regval, SDHCI_ARASAN_OTAPDLY_REGISTER);
> 780     		regval |= tap_delay;
> 781     		sdhci_writel(host, regval, SDHCI_ARASAN_OTAPDLY_REGISTER);
> 782     	}
> 783
> vvv     CID 1492645:  Uninitialized variables  (UNINIT)
> vvv     Using uninitialized value "ret".
> 784     	return ret;
> 785     }
> 786
> 787     static const struct clk_ops versal_sdcardclk_ops = {
> 788     	.recalc_rate = sdhci_arasan_sdcardclk_recalc_rate,
> 789     	.set_phase = sdhci_versal_sdcardclk_set_phase,
> 
> 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):
> 
> Human edit: also on line 860, same issue.
> 
> Reported-by: coverity-bot <keescook+coverity-bot@xxxxxxxxxxxx>
> Addresses-Coverity-ID: 1492645 ("Uninitialized variables")
> Fixes: f73e66a36772 ("sdhci: arasan: Add support for Versal Tap Delays")
> 
> Thanks for your attention!

This was reported elsewhere and should be fixed in today's linux-next.

-- 
Cheers,
Stephen Rothwell

Attachment: pgprBZibqkn4J.pgp
Description: OpenPGP digital signature


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

  Powered by Linux