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 8494ba2 commit 8731fe0Copy full SHA for 8731fe0
drivers/crypto/ccp/sev-dev.c
@@ -515,10 +515,16 @@ EXPORT_SYMBOL_GPL(sev_platform_init);
515
516
static int __sev_platform_shutdown_locked(int *error)
517
{
518
- struct sev_device *sev = psp_master->sev_data;
+ struct psp_device *psp = psp_master;
519
+ struct sev_device *sev;
520
int ret;
521
- if (!sev || sev->state == SEV_STATE_UNINIT)
522
+ if (!psp || !psp->sev_data)
523
+ return 0;
524
+
525
+ sev = psp->sev_data;
526
527
+ if (sev->state == SEV_STATE_UNINIT)
528
return 0;
529
530
ret = __sev_do_cmd_locked(SEV_CMD_SHUTDOWN, NULL, error);
0 commit comments