From ad7647d92f61c6e78bf6dc3804da1e2acf0515b6 Mon Sep 17 00:00:00 2001 From: Dmitry Torokhov Date: Fri, 3 Jan 2014 20:54:37 -0800 Subject: [PATCH] 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 --- drivers/input/misc/ims-pcu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/input/misc/ims-pcu.c b/drivers/input/misc/ims-pcu.c index e204f26b0011..5e8e90260037 100644 --- a/drivers/input/misc/ims-pcu.c +++ b/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; } -- 2.20.1