platform/x86/amd/pmf: Fix missing error code in amd_pmf_init_smart_pc()
authorHarshit Mogalapalli <harshit.m.mogalapalli@oracle.com>
Mon, 26 Feb 2024 14:40:10 +0000 (06:40 -0800)
committerHans de Goede <hdegoede@redhat.com>
Tue, 5 Mar 2024 09:17:07 +0000 (10:17 +0100)
commit0314cebb29be2f961abb37bd0b01cb16899868f2
treed0a82e717a86b3e95154215dcfba0ce83a534aa1
parentaec7d25b497ce4a8d044e9496de0aa433f7f8f06
platform/x86/amd/pmf: Fix missing error code in amd_pmf_init_smart_pc()

On the error path, assign -ENOMEM to ret when memory allocation of
"dev->prev_data" fails.

Fixes: e70961505808 ("platform/x86/amd/pmf: Fixup error handling for amd_pmf_init_smart_pc()")
Signed-off-by: Harshit Mogalapalli <harshit.m.mogalapalli@oracle.com>
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Reviewed-by: Mario Limonciello <mario.limonciello@amd.com>
Link: https://lore.kernel.org/r/20240226144011.2100804-1-harshit.m.mogalapalli@oracle.com
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
drivers/platform/x86/amd/pmf/tee-if.c