* [PATCH] asus_acpi: fix oops on non-asus machines
@ 2007-06-05 15:31 Maxime Austruy
0 siblings, 0 replies; only message in thread
From: Maxime Austruy @ 2007-06-05 15:31 UTC (permalink / raw)
To: linux-acpi; +Cc: corentincj, sziwan
This change fixes an oops when rmmod'ing the asus_acpi module on
non-asus machine. Inspection of the code nearby also unveiled a problem
in the error path of backlight_device_register, so this fixes it too.
Signed-off-by: Maxime Austruy <maxime@tralhalla.org>
--
drivers/acpi/asus_acpi.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/acpi/asus_acpi.c b/drivers/acpi/asus_acpi.c
index 6d7d415..3cd79ca 100644
--- a/drivers/acpi/asus_acpi.c
+++ b/drivers/acpi/asus_acpi.c
@@ -1398,7 +1398,7 @@ static int __init asus_acpi_init(void)
if (!asus_hotk_found) {
acpi_bus_unregister_driver(&asus_hotk_driver);
remove_proc_entry(PROC_ASUS, acpi_root_dir);
- return result;
+ return -ENODEV;
}
asus_backlight_device = backlight_device_register("asus",NULL,NULL,
@@ -1407,6 +1407,7 @@ static int __init asus_acpi_init(void)
printk(KERN_ERR "Could not register asus backlight device\n");
asus_backlight_device = NULL;
asus_acpi_exit();
+ return -ENODEV;
}
asus_backlight_device->props.max_brightness = 15;
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2007-06-05 15:36 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-06-05 15:31 [PATCH] asus_acpi: fix oops on non-asus machines Maxime Austruy
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.