]> git.ipfire.org Git - thirdparty/linux.git/commit
platform/x86: panasonic-laptop: Fix sysfs group leak in error path
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Tue, 20 Jan 2026 15:43:44 +0000 (16:43 +0100)
committerIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
Mon, 26 Jan 2026 14:38:04 +0000 (16:38 +0200)
commit43b0b7eff4b3fb684f257d5a24376782e9663465
treed3d3f81db517ce3f4ec60086ec92b4eee1af25ef
parent4b11f2336e23d5c55b76591bd8ac39b059f68ad0
platform/x86: panasonic-laptop: Fix sysfs group leak in error path

The acpi_pcc_hotkey_add() error path leaks sysfs group pcc_attr_group
if platform_device_register_simple() fails for the "panasonic" platform
device.

Address this by making it call sysfs_remove_group() in that case for
the group in question.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Link: https://patch.msgid.link/3398370.44csPzL39Z@rafael.j.wysocki
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
drivers/platform/x86/panasonic-laptop.c