Skip to content

Commit

Permalink
crypto: ccp - Fix sparse, use plain integer as NULL pointer
Browse files Browse the repository at this point in the history
Fix sparse warning: Using plain integer as NULL pointer. Replaces
assignment of 0 to pointer with NULL assignment.

Fixes: 200664d (Add Secure Encrypted Virtualization ...)
Cc: Borislav Petkov <[email protected]>
Cc: Herbert Xu <[email protected]>
Cc: Gary Hook <[email protected]>
Cc: Tom Lendacky <[email protected]>
Signed-off-by: Brijesh Singh <[email protected]>
Acked-by: Gary R Hook <[email protected]>
Signed-off-by: Herbert Xu <[email protected]>
  • Loading branch information
codomania authored and herbertx committed Mar 2, 2018
1 parent 0a9eb80 commit e385b5b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions drivers/crypto/ccp/psp-dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ static int __sev_platform_shutdown_locked(int *error)
{
int ret;

ret = __sev_do_cmd_locked(SEV_CMD_SHUTDOWN, 0, error);
ret = __sev_do_cmd_locked(SEV_CMD_SHUTDOWN, NULL, error);
if (ret)
return ret;

Expand Down Expand Up @@ -271,7 +271,7 @@ static int sev_ioctl_do_reset(struct sev_issue_cmd *argp)
return rc;
}

return __sev_do_cmd_locked(SEV_CMD_FACTORY_RESET, 0, &argp->error);
return __sev_do_cmd_locked(SEV_CMD_FACTORY_RESET, NULL, &argp->error);
}

static int sev_ioctl_do_platform_status(struct sev_issue_cmd *argp)
Expand Down Expand Up @@ -299,7 +299,7 @@ static int sev_ioctl_do_pek_pdh_gen(int cmd, struct sev_issue_cmd *argp)
return rc;
}

return __sev_do_cmd_locked(cmd, 0, &argp->error);
return __sev_do_cmd_locked(cmd, NULL, &argp->error);
}

static int sev_ioctl_do_pek_csr(struct sev_issue_cmd *argp)
Expand Down Expand Up @@ -624,7 +624,7 @@ EXPORT_SYMBOL_GPL(sev_guest_decommission);

int sev_guest_df_flush(int *error)
{
return sev_do_cmd(SEV_CMD_DF_FLUSH, 0, error);
return sev_do_cmd(SEV_CMD_DF_FLUSH, NULL, error);
}
EXPORT_SYMBOL_GPL(sev_guest_df_flush);

Expand Down

0 comments on commit e385b5b

Please sign in to comment.