linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Input: ims-pcu - fix error unwinding path in application mode
@ 2014-01-04  5:00 Dmitry Torokhov
  2014-01-04  5:13 ` Andrey Smirnov
  0 siblings, 1 reply; 3+ messages in thread
From: Dmitry Torokhov @ 2014-01-04  5:00 UTC (permalink / raw)
  To: linux-input; +Cc: Andrey Smirnov, Chris Healy, linux-kernel

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

Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
---

Andrey, this fixup was split off from the patch I sent earlier today.

 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 4244f47..513ecdf 100644
--- a/drivers/input/misc/ims-pcu.c
+++ b/drivers/input/misc/ims-pcu.c
@@ -1929,10 +1929,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;
 }
 
-- 
1.8.4.2


-- 
Dmitry

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-01-04  5:29 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-01-04  5:00 [PATCH] Input: ims-pcu - fix error unwinding path in application mode Dmitry Torokhov
2014-01-04  5:13 ` Andrey Smirnov
2014-01-04  5:29   ` Dmitry Torokhov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).