All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stephen Rothwell <sfr@canb.auug.org.au>
To: coverity-bot <keescook@chromium.org>
Cc: Manish Narani <manish.narani@xilinx.com>,
	Ulf Hansson <ulf.hansson@linaro.org>,
	Adrian Hunter <adrian.hunter@intel.com>,
	"Gustavo A. R. Silva" <gustavo@embeddedor.com>,
	linux-next@vger.kernel.org
Subject: Re: Coverity: sdhci_versal_sdcardclk_set_phase(): Uninitialized variables
Date: Mon, 20 Apr 2020 09:35:56 +1000	[thread overview]
Message-ID: <20200420093556.27bcd407@canb.auug.org.au> (raw)
In-Reply-To: <202004171451.9D7ED8B@keescook>

[-- Attachment #1: Type: text/plain, Size: 2015 bytes --]

Hi Kees,

On Fri, 17 Apr 2020 14:52:01 -0700 coverity-bot <keescook@chromium.org> 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@chromium.org>
> 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 #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

      reply	other threads:[~2020-04-19 23:36 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-17 21:52 Coverity: sdhci_versal_sdcardclk_set_phase(): Uninitialized variables coverity-bot
2020-04-19 23:35 ` Stephen Rothwell [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200420093556.27bcd407@canb.auug.org.au \
    --to=sfr@canb.auug.org.au \
    --cc=adrian.hunter@intel.com \
    --cc=gustavo@embeddedor.com \
    --cc=keescook@chromium.org \
    --cc=linux-next@vger.kernel.org \
    --cc=manish.narani@xilinx.com \
    --cc=ulf.hansson@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.