aboutsummaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorAxel Lin <axel.lin@gmail.com>2011-07-27 15:27:34 +0800
committerJohn Rigby <john.rigby@linaro.org>2011-09-23 08:55:21 -0600
commit7abd15ab4dfd6ea55e2febb0f32b4bd0d605ac6f (patch)
treebd0cf2bc47381dfa9df0afa31dd0f2ff4693d193 /drivers
parent1563f48d396fa62f9d5b580df97e31cc25593c16 (diff)
ideapad: add missing ideapad_input_exit in ideapad_acpi_add error path
In the case of ideapad_backlight_init() failure, we need to free the resources allocated by ideapad_input_init(). Aslo drop __devexit annotation for ideapad_input_exit() because we also call it in ideapad_acpi_add() error path. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Matthew Garrett <mjg@redhat.com> (cherry picked from mainline commit 7451a55af08d40fd6b28802f4e26a13264114430) Signed-off-by: Ike Panhc <ike.pan@canonical.com> Signed-off-by: Leann Ogasawara <leann.ogasawara@canonical.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/platform/x86/ideapad-laptop.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/platform/x86/ideapad-laptop.c b/drivers/platform/x86/ideapad-laptop.c
index 8811c68f809..0c595410e78 100644
--- a/drivers/platform/x86/ideapad-laptop.c
+++ b/drivers/platform/x86/ideapad-laptop.c
@@ -406,7 +406,7 @@ err_free_dev:
return error;
}
-static void __devexit ideapad_input_exit(struct ideapad_private *priv)
+static void ideapad_input_exit(struct ideapad_private *priv)
{
sparse_keymap_free(priv->inputdev);
input_unregister_device(priv->inputdev);
@@ -563,6 +563,7 @@ static int __devinit ideapad_acpi_add(struct acpi_device *adevice)
backlight_failed:
for (i = 0; i < IDEAPAD_RFKILL_DEV_NUM; i++)
ideapad_unregister_rfkill(adevice, i);
+ ideapad_input_exit(priv);
input_failed:
ideapad_platform_exit(priv);
platform_failed: