[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20210917032121.GH6559@gondor.apana.org.au>
Date: Fri, 17 Sep 2021 11:21:21 +0800
From: Herbert Xu <herbert@...dor.apana.org.au>
To: Tim Gardner <tim.gardner@...onical.com>
Cc: linux-crypto@...r.kernel.org,
"David S. Miller" <davem@...emloft.net>,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] crypto: drbg - Fix unused value warning in
drbg_healthcheck_sanity()
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@...dor.apana.org.au>
> Cc: "David S. Miller" <davem@...emloft.net>
> Cc: linux-crypto@...r.kernel.org
> Cc: linux-kernel@...r.kernel.org
> Signed-off-by: Tim Gardner <tim.gardner@...onical.com>
> ---
> crypto/drbg.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Patch applied. Thanks.
--
Email: Herbert Xu <herbert@...dor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
Powered by blists - more mailing lists