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 6d4e199 commit 468e329Copy full SHA for 468e329
drivers/crypto/ccp/sev-dev.c
@@ -1642,10 +1642,16 @@ static int sev_update_firmware(struct device *dev)
1642
1643
static int __sev_snp_shutdown_locked(int *error, bool panic)
1644
{
1645
- struct sev_device *sev = psp_master->sev_data;
+ struct psp_device *psp = psp_master;
1646
+ struct sev_device *sev;
1647
struct sev_data_snp_shutdown_ex data;
1648
int ret;
1649
1650
+ if (!psp || !psp->sev_data)
1651
+ return 0;
1652
+
1653
+ sev = psp->sev_data;
1654
1655
if (!sev->snp_initialized)
1656
return 0;
1657
0 commit comments