Skip to content

Commit f5a2aeb

Browse files
codomaniaherbertx
authored andcommitted
crypto: ccp - Do not free psp_master when PLATFORM_INIT fails
Currently, we free the psp_master if the PLATFORM_INIT fails during the SEV FW probe. If psp_master is freed then driver does not invoke the PSP FW. As per SEV FW spec, there are several commands (PLATFORM_RESET, PLATFORM_STATUS, GET_ID etc) which can be executed in the UNINIT state We should not free the psp_master when PLATFORM_INIT fails. Fixes: 200664d ("crypto: ccp: Add SEV support") Cc: Tom Lendacky <[email protected]> Cc: Herbert Xu <[email protected]> Cc: Gary Hook <[email protected]> Cc: [email protected] # 4.19.y Signed-off-by: Brijesh Singh <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
1 parent a88be9a commit f5a2aeb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/crypto/ccp/psp-dev.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1064,7 +1064,7 @@ void psp_pci_init(void)
10641064
rc = sev_platform_init(&error);
10651065
if (rc) {
10661066
dev_err(sp->dev, "SEV: failed to INIT error %#x\n", error);
1067-
goto err;
1067+
return;
10681068
}
10691069

10701070
dev_info(sp->dev, "SEV API:%d.%d build:%d\n", psp_master->api_major,

0 commit comments

Comments
 (0)