Skip to content

Commit

Permalink
platform-drivers-x86: ideapad-laptop: add missing ideapad_input_exit …
Browse files Browse the repository at this point in the history
…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>
  • Loading branch information
Axel Lin authored and Matthew Garrett committed Aug 5, 2011
1 parent 70fda70 commit 7451a55
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/platform/x86/ideapad-laptop.c
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,7 @@ static int __devinit ideapad_input_init(struct ideapad_private *priv)
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);
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit 7451a55

Please sign in to comment.