Browse Source

Input: ims-pcu - fix error unwinding path in application mode

We first create backlight and then input devices so we should destroy them
in opposite order when handling errors.

Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Dmitry Torokhov 11 years ago
parent
commit
ad7647d92f
1 changed files with 2 additions and 2 deletions
  1. 2 2
      drivers/input/misc/ims-pcu.c

+ 2 - 2
drivers/input/misc/ims-pcu.c

@@ -1674,10 +1674,10 @@ static int ims_pcu_init_application_mode(struct ims_pcu *pcu)
 
 	return 0;
 
-err_destroy_backlight:
-	ims_pcu_destroy_backlight(pcu);
 err_destroy_buttons:
 	ims_pcu_destroy_buttons(pcu);
+err_destroy_backlight:
+	ims_pcu_destroy_backlight(pcu);
 	return error;
 }