From: Dmitry Torokhov Date: Sat, 4 Jan 2014 04:54:37 +0000 (-0800) Subject: Input: ims-pcu - fix error unwinding path in application mode X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=ad7647d92f61c6e78bf6dc3804da1e2acf0515b6;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git 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 --- 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; }