]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
platform/x86/intel/ifs: Call release_firmware() when handling errors.
authorJithu Joseph <jithu.joseph@intel.com>
Thu, 25 Jan 2024 08:22:50 +0000 (00:22 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 1 Feb 2024 00:21:20 +0000 (16:21 -0800)
commite8931ebb0143dc4a3ad302be6f963ae375548bc0
tree878261982cd087e983f6db895473a6a26a64d3c6
parent54ed6fed7cd7ee139dfd40d6818e40b1033e0643
platform/x86/intel/ifs: Call release_firmware() when handling errors.

[ Upstream commit 8c898ec07a2fc1d4694e81097a48e94a3816308d ]

Missing release_firmware() due to error handling blocked any future image
loading.

Fix the return code and release_fiwmare() to release the bad image.

Fixes: 25a76dbb36dd ("platform/x86/intel/ifs: Validate image size")
Reported-by: Pengfei Xu <pengfei.xu@intel.com>
Signed-off-by: Jithu Joseph <jithu.joseph@intel.com>
Signed-off-by: Ashok Raj <ashok.raj@intel.com>
Tested-by: Pengfei Xu <pengfei.xu@intel.com>
Reviewed-by: Tony Luck <tony.luck@intel.com>
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Link: https://lore.kernel.org/r/20240125082254.424859-2-ashok.raj@intel.com
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/platform/x86/intel/ifs/load.c