diff options
author | Mario Limonciello <[email protected]> | 2024-02-16 19:41:07 -0600 |
---|---|---|
committer | Hans de Goede <[email protected]> | 2024-02-19 13:39:44 +0100 |
commit | e7096150580849429ff3d43dd69a718bb2036be4 (patch) | |
tree | d2911a43c067429a70d05580f228321c6357baca /drivers/platform/x86/serdev_helpers.h | |
parent | 20545af302bb1f6a67c0348b64032c11ecfa77ba (diff) |
platform/x86/amd/pmf: Fixup error handling for amd_pmf_init_smart_pc()
amd_pmf_init_smart_pc() calls out to amd_pmf_get_bios_buffer() but
the error handling flow doesn't clean everything up allocated
memory.
As amd_pmf_get_bios_buffer() is only called by amd_pmf_init_smart_pc(),
fold it into the function and add labels to clean up any step that
can fail along the way. Explicitly set everything allocated to NULL as
there are other features that may access some of the same variables.
Fixes: 7c45534afa44 ("platform/x86/amd/pmf: Add support for PMF Policy Binary")
Signed-off-by: Mario Limonciello <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Reviewed-by: Hans de Goede <[email protected]>
Signed-off-by: Hans de Goede <[email protected]>
Diffstat (limited to 'drivers/platform/x86/serdev_helpers.h')
0 files changed, 0 insertions, 0 deletions