diff options
| author | Kurt Borja <[email protected]> | 2025-06-30 17:31:20 +0000 |
|---|---|---|
| committer | Ilpo Järvinen <[email protected]> | 2025-07-02 09:01:23 +0000 |
| commit | 9110056fe10b0519529bdbbac37311a5037ea0c2 (patch) | |
| tree | 9baa77ce4d92498b32df5addf16f8aaeaed38063 /rust/helpers/pci.c | |
| parent | platform/x86: think-lmi: Create ksets consecutively (diff) | |
| download | kernel-9110056fe10b0519529bdbbac37311a5037ea0c2.tar.gz kernel-9110056fe10b0519529bdbbac37311a5037ea0c2.zip | |
platform/x86: think-lmi: Fix kobject cleanup
In tlmi_analyze(), allocated structs with an embedded kobject are freed
in error paths after the they were already initialized.
Fix this by first by avoiding the initialization of kobjects in
tlmi_analyze() and then by correctly cleaning them up in
tlmi_release_attr() using their kset's kobject list.
Fixes: a40cd7ef22fb ("platform/x86: think-lmi: Add WMI interface support on Lenovo platforms")
Fixes: 30e78435d3bf ("platform/x86: think-lmi: Split kobject_init() and kobject_add() calls")
Cc: [email protected]
Reviewed-by: Mark Pearson <[email protected]>
Reviewed-by: Ilpo Järvinen <[email protected]>
Signed-off-by: Kurt Borja <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Ilpo Järvinen <[email protected]>
Diffstat (limited to 'rust/helpers/pci.c')
0 files changed, 0 insertions, 0 deletions
