mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-16 05:26:07 +00:00
Merge branch 'acpi-fan' into linux-next
* acpi-fan: ACPI: fan: cleanup resources in the error path of .probe()
This commit is contained in:
commit
0e8832f072
@ -371,19 +371,25 @@ static int acpi_fan_probe(struct platform_device *pdev)
|
||||
result = sysfs_create_link(&pdev->dev.kobj,
|
||||
&cdev->device.kobj,
|
||||
"thermal_cooling");
|
||||
if (result)
|
||||
if (result) {
|
||||
dev_err(&pdev->dev, "Failed to create sysfs link 'thermal_cooling'\n");
|
||||
goto err_unregister;
|
||||
}
|
||||
|
||||
result = sysfs_create_link(&cdev->device.kobj,
|
||||
&pdev->dev.kobj,
|
||||
"device");
|
||||
if (result) {
|
||||
dev_err(&pdev->dev, "Failed to create sysfs link 'device'\n");
|
||||
goto err_end;
|
||||
goto err_remove_link;
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
err_remove_link:
|
||||
sysfs_remove_link(&pdev->dev.kobj, "thermal_cooling");
|
||||
err_unregister:
|
||||
thermal_cooling_device_unregister(cdev);
|
||||
err_end:
|
||||
if (fan->acpi4)
|
||||
acpi_fan_delete_attributes(device);
|
||||
|
Loading…
x
Reference in New Issue
Block a user