We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ea5ddbc commit 88aa493Copy full SHA for 88aa493
drivers/crypto/ccp/sev-dev.c
@@ -520,10 +520,16 @@ EXPORT_SYMBOL_GPL(sev_platform_init);
520
521
static int __sev_platform_shutdown_locked(int *error)
522
{
523
- struct sev_device *sev = psp_master->sev_data;
+ struct psp_device *psp = psp_master;
524
+ struct sev_device *sev;
525
int ret;
526
- if (!sev || sev->state == SEV_STATE_UNINIT)
527
+ if (!psp || !psp->sev_data)
528
+ return 0;
529
+
530
+ sev = psp->sev_data;
531
532
+ if (sev->state == SEV_STATE_UNINIT)
533
return 0;
534
535
ret = __sev_do_cmd_locked(SEV_CMD_SHUTDOWN, NULL, error);
0 commit comments