summaryrefslogtreecommitdiffstats
path: root/drivers/crypto/ccp
diff options
context:
space:
mode:
authorJanakarajan Natarajan <Janakarajan.Natarajan@amd.com>2018-09-14 17:32:03 -0500
committerHerbert Xu <herbert@gondor.apana.org.au>2018-09-21 13:24:52 +0800
commitb78d3795177db479107b3493608bf088117325e3 (patch)
tree51ca9131b252169d3ced84bb5376e37baa3ba650 /drivers/crypto/ccp
parentac3c8f36c31d2f0add4eeaa42c7d0540d7c60583 (diff)
downloadblackbird-op-linux-b78d3795177db479107b3493608bf088117325e3.tar.gz
blackbird-op-linux-b78d3795177db479107b3493608bf088117325e3.zip
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.c2
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);
OpenPOWER on IntegriCloud