aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/thermal/int340x_thermal/int3400_thermal.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/drivers/thermal/int340x_thermal/int3400_thermal.c b/drivers/thermal/int340x_thermal/int3400_thermal.c
index c9db1c643501..e26b01c05e82 100644
--- a/drivers/thermal/int340x_thermal/int3400_thermal.c
+++ b/drivers/thermal/int340x_thermal/int3400_thermal.c
@@ -319,17 +319,21 @@ static int int3400_thermal_probe(struct platform_device *pdev)
319 319
320 result = sysfs_create_group(&pdev->dev.kobj, &uuid_attribute_group); 320 result = sysfs_create_group(&pdev->dev.kobj, &uuid_attribute_group);
321 if (result) 321 if (result)
322 goto free_zone; 322 goto free_rel_misc;
323 323
324 result = acpi_install_notify_handler( 324 result = acpi_install_notify_handler(
325 priv->adev->handle, ACPI_DEVICE_NOTIFY, int3400_notify, 325 priv->adev->handle, ACPI_DEVICE_NOTIFY, int3400_notify,
326 (void *)priv); 326 (void *)priv);
327 if (result) 327 if (result)
328 goto free_zone; 328 goto free_sysfs;
329 329
330 return 0; 330 return 0;
331 331
332free_zone: 332free_sysfs:
333 sysfs_remove_group(&pdev->dev.kobj, &uuid_attribute_group);
334free_rel_misc:
335 if (!priv->rel_misc_dev_res)
336 acpi_thermal_rel_misc_device_remove(priv->adev->handle);
333 thermal_zone_device_unregister(priv->thermal); 337 thermal_zone_device_unregister(priv->thermal);
334free_art_trt: 338free_art_trt:
335 kfree(priv->trts); 339 kfree(priv->trts);