ACPI: button: Add missing device class clearing on probe failures
Commitmastere18947038b("ACPI: driver: Do not set acpi_device_class() unnecessarily") modified acpi_button_remove() to clear the device class field in struct acpi_device on driver removal, but it should also have updated the rollback path in acpi_button_probe(), which it didn't do, so do it now. Fixes:e18947038b("ACPI: driver: Do not set acpi_device_class() unnecessarily") Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Reviewed-by: Mario Limonciello (AMD) <superm1@kernel.org> Link: https://patch.msgid.link/6167713.MhkbZ0Pkbq@rafael.j.wysocki
parent
a004b8f0d3
commit
3109f9f388
|
|
@ -687,6 +687,7 @@ err_remove_fs:
|
|||
acpi_button_remove_fs(button);
|
||||
err_free_button:
|
||||
kfree(button);
|
||||
memset(acpi_device_class(device), 0, sizeof(acpi_device_class));
|
||||
return error;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue