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 7e9b622 commit 7535ec3Copy full SHA for 7535ec3
drivers/crypto/ccp/sev-dev.c
@@ -323,10 +323,16 @@ EXPORT_SYMBOL_GPL(sev_platform_init);
323
324
static int __sev_platform_shutdown_locked(int *error)
325
{
326
- struct sev_device *sev = psp_master->sev_data;
+ struct psp_device *psp = psp_master;
327
+ struct sev_device *sev;
328
int ret;
329
- if (!sev || sev->state == SEV_STATE_UNINIT)
330
+ if (!psp || !psp->sev_data)
331
+ return 0;
332
+
333
+ sev = psp->sev_data;
334
335
+ if (sev->state == SEV_STATE_UNINIT)
336
return 0;
337
338
ret = __sev_do_cmd_locked(SEV_CMD_SHUTDOWN, NULL, error);
0 commit comments