mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Herbert Xu <herbert@gondor.apana.org.au>
To: Tim Gardner <tim.gardner@canonical.com>
Cc: linux-crypto@vger.kernel.org,
	"David S. Miller" <davem@davemloft.net>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] crypto: drbg - Fix unused value warning in drbg_healthcheck_sanity()
Date: Fri, 17 Sep 2021 11:21:21 +0800	[thread overview]
Message-ID: <20210917032121.GH6559@gondor.apana.org.au> (raw)
In-Reply-To: <20210910190117.24882-1-tim.gardner@canonical.com>

On Fri, Sep 10, 2021 at 01:01:17PM -0600, Tim Gardner wrote:
> Coverity warns uf an unused value:
> 
> CID 44865 (#2 of 2): Unused value (UNUSED_VALUE)
> assigned_value: Assigning value -14 to ret here, but that stored value is
> overwritten before it can be used.
> 2006        int ret = -EFAULT;
> ...
> value_overwrite: Overwriting previous write to ret with value from drbg_seed(drbg, &addtl, false).
> 2052        ret = drbg_seed(drbg, &addtl, false);
> 
> Fix this by removing the variable initializer.
> 
> Cc: Herbert Xu <herbert@gondor.apana.org.au>
> Cc: "David S. Miller" <davem@davemloft.net>
> Cc: linux-crypto@vger.kernel.org
> Cc: linux-kernel@vger.kernel.org
> Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
> ---
>  crypto/drbg.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Patch applied.  Thanks.
-- 
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

      reply	other threads:[~2021-09-17  3:21 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-10 19:01 Tim Gardner
2021-09-17  3:21 ` Herbert Xu [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=20210917032121.GH6559@gondor.apana.org.au \
    --to=herbert@gondor.apana.org.au \
    --cc=davem@davemloft.net \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tim.gardner@canonical.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®