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 c5a2f74 commit ccb88e9Copy full SHA for ccb88e9
drivers/crypto/ccp/sev-dev.c
@@ -534,10 +534,16 @@ EXPORT_SYMBOL_GPL(sev_platform_init);
534
535
static int __sev_platform_shutdown_locked(int *error)
536
{
537
- struct sev_device *sev = psp_master->sev_data;
+ struct psp_device *psp = psp_master;
538
+ struct sev_device *sev;
539
int ret;
540
- if (!sev || sev->state == SEV_STATE_UNINIT)
541
+ if (!psp || !psp->sev_data)
542
+ return 0;
543
+
544
+ sev = psp->sev_data;
545
546
+ if (sev->state == SEV_STATE_UNINIT)
547
return 0;
548
549
ret = __sev_do_cmd_locked(SEV_CMD_SHUTDOWN, NULL, error);
0 commit comments