summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--drivers/platform/x86/panasonic-laptop.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/platform/x86/panasonic-laptop.c b/drivers/platform/x86/panasonic-laptop.c
index 7365286f6d2d..ad907c558997 100644
--- a/drivers/platform/x86/panasonic-laptop.c
+++ b/drivers/platform/x86/panasonic-laptop.c
@@ -1077,7 +1077,7 @@ static int acpi_pcc_hotkey_add(struct acpi_device *device)
PLATFORM_DEVID_NONE, NULL, 0);
if (IS_ERR(pcc->platform)) {
result = PTR_ERR(pcc->platform);
- goto out_backlight;
+ goto out_sysfs;
}
result = device_create_file(&pcc->platform->dev,
&dev_attr_cdpower);
@@ -1093,6 +1093,8 @@ static int acpi_pcc_hotkey_add(struct acpi_device *device)
out_platform:
platform_device_unregister(pcc->platform);
+out_sysfs:
+ sysfs_remove_group(&device->dev.kobj, &pcc_attr_group);
out_backlight:
backlight_device_unregister(pcc->backlight);
out_input: