]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
platform/x86/intel/vsec: free ACPI discovery data on early errors
authorYousef Alhouseen <alhouseenyousef@gmail.com>
Mon, 6 Jul 2026 13:13:39 +0000 (09:13 -0400)
committerIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
Fri, 10 Jul 2026 17:29:34 +0000 (20:29 +0300)
commit09b2ae290a241ce1f5f738fb65c35f449dcf663d
treebdb549a13779d5a7b375682bcb3cca699af18d1c
parent2726b5758f80a546a4ddeec5019e72035a7fa166
platform/x86/intel/vsec: free ACPI discovery data on early errors

intel_vsec_add_dev() may attach an ACPI discovery table copy to the
intel_vsec_device before passing ownership to intel_vsec_add_aux(). The
normal auxiliary-device release path frees that copy, but the earliest
intel_vsec_add_aux() failures free only the outer structure directly.

Route those direct frees through a common helper so acpi_disc is
released consistently on the parent, xarray, and ID allocation failure
paths.

Fixes: 22fa2ebc11a1 ("platform/x86/intel/vsec: Plumb ACPI PMT discovery tables through vsec")
Signed-off-by: Yousef Alhouseen <alhouseenyousef@gmail.com>
Reviewed-by: David E. Box <david.e.box@linux.intel.com>
Link: https://patch.msgid.link/CAMuQ4bUtJtYNTguKoiXngROJw0QQQcrvW3=3_B0-hpMQOFqvCQ@mail.gmail.com
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
drivers/platform/x86/intel/vsec.c