aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/platform
diff options
context:
space:
mode:
authorAxel Lin <axel.lin@gmail.com>2011-07-27 03:27:34 -0400
committerMatthew Garrett <mjg@redhat.com>2011-08-05 15:21:50 -0400
commit7451a55af08d40fd6b28802f4e26a13264114430 (patch)
tree651ab1840943cc5974e577806b3ddbe60f52470b /drivers/platform
parent70fda70a724c737b0df4195763f9124d181fe64d (diff)
platform-drivers-x86: ideapad-laptop: 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>
Diffstat (limited to 'drivers/platform')
-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 8811c68f809d..0c595410e788 100644
--- a/drivers/platform/x86/ideapad-laptop.c
+++ b/drivers/platform/x86/ideapad-laptop.c
@@ -406,7 +406,7 @@ err_free_dev:
406 return error; 406 return error;
407} 407}
408 408
409static void __devexit ideapad_input_exit(struct ideapad_private *priv) 409static void ideapad_input_exit(struct ideapad_private *priv)
410{ 410{
411 sparse_keymap_free(priv->inputdev); 411 sparse_keymap_free(priv->inputdev);
412 input_unregister_device(priv->inputdev); 412 input_unregister_device(priv->inputdev);
@@ -563,6 +563,7 @@ static int __devinit ideapad_acpi_add(struct acpi_device *adevice)
563backlight_failed: 563backlight_failed:
564 for (i = 0; i < IDEAPAD_RFKILL_DEV_NUM; i++) 564 for (i = 0; i < IDEAPAD_RFKILL_DEV_NUM; i++)
565 ideapad_unregister_rfkill(adevice, i); 565 ideapad_unregister_rfkill(adevice, i);
566 ideapad_input_exit(priv);
566input_failed: 567input_failed:
567 ideapad_platform_exit(priv); 568 ideapad_platform_exit(priv);
568platform_failed: 569platform_failed: