From: Maxime Austruy <maxime@tralhalla.org>
To: linux-acpi@vger.kernel.org
Cc: corentincj@iksaif.net, sziwan@users.sourceforge.net
Subject: [PATCH] asus_acpi: fix oops on non-asus machines
Date: Tue, 5 Jun 2007 08:31:32 -0700 [thread overview]
Message-ID: <20070605153132.GA7184@tralhalla.org> (raw)
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;
reply other threads:[~2007-06-05 15:36 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20070605153132.GA7184@tralhalla.org \
--to=maxime@tralhalla.org \
--cc=corentincj@iksaif.net \
--cc=linux-acpi@vger.kernel.org \
--cc=sziwan@users.sourceforge.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.