[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <8dfca0f4-6639-3444-148f-eb0b0817fec6@amd.com>
Date: Wed, 19 Sep 2018 13:40:53 +0000
From: Gary R Hook <ghook@....com>
To: "Natarajan, Janakarajan" <Janakarajan.Natarajan@....com>,
"linux-crypto@...r.kernel.org" <linux-crypto@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
CC: "Lendacky, Thomas" <Thomas.Lendacky@....com>,
"Hook, Gary" <Gary.Hook@....com>,
Herbert Xu <herbert@...dor.apana.org.au>,
"David S . Miller" <davem@...emloft.net>,
"Singh, Brijesh" <brijesh.singh@....com>,
Dan Carpenter <Dan.Carpenter@...cle.com>
Subject: Re: [PATCH 1/2] Fix static checker warning
On 09/14/2018 05:32 PM, Janakarajan Natarajan wrote:
> Under certain configuration SEV functions can be defined as no-op.
> In such a case error can be uninitialized.
>
> Initialize the variable to 0.
>
> Cc: Dan Carpenter <Dan.Carpenter@...cle.com>
> Reported-by: Dan Carpenter <Dan.Carpenter@...cle.com>
> Signed-off-by: Janakarajan Natarajan <Janakarajan.Natarajan@....com>
Acked-by: Gary R Hook <gary.hook@....com>
> ---
> drivers/crypto/ccp/psp-dev.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/crypto/ccp/psp-dev.c b/drivers/crypto/ccp/psp-dev.c
> index 72790d8..f541e60 100644
> --- a/drivers/crypto/ccp/psp-dev.c
> +++ b/drivers/crypto/ccp/psp-dev.c
> @@ -423,7 +423,7 @@ EXPORT_SYMBOL_GPL(psp_copy_user_blob);
> static int sev_get_api_version(void)
> {
> struct sev_user_data_status *status;
> - int error, ret;
> + int error = 0, ret;
>
> status = &psp_master->status_cmd_buf;
> ret = sev_platform_status(status, &error);
>
Powered by blists - more mailing lists