diff options
author | Janakarajan Natarajan <Janakarajan.Natarajan@amd.com> | 2018-09-14 17:32:03 -0500 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2018-09-21 13:24:52 +0800 |
commit | b78d3795177db479107b3493608bf088117325e3 (patch) | |
tree | 51ca9131b252169d3ced84bb5376e37baa3ba650 /drivers/crypto/ccp | |
parent | ac3c8f36c31d2f0add4eeaa42c7d0540d7c60583 (diff) |
crypto: ccp - Fix static checker warning
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@oracle.com>
Reported-by: Dan Carpenter <Dan.Carpenter@oracle.com>
Signed-off-by: Janakarajan Natarajan <Janakarajan.Natarajan@amd.com>
Acked-by: Gary R Hook <gary.hook@amd.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/crypto/ccp')
-rw-r--r-- | drivers/crypto/ccp/psp-dev.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/crypto/ccp/psp-dev.c b/drivers/crypto/ccp/psp-dev.c index 72790d88236d..f541e60702cc 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); |