Skip to contentSkip to conversation

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

PATCH In review Dmitry Torokhov 2 participants 3 messages Jan 4, 2014

Subsystems (2)
lore
Share & tools
lore

Dmitry Torokhov

author maintainer
#0 lore raw

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

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

---

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(-)
drivers/input/misc/ims-pcu.c +2 -2
index 4244f47..513ecdf 100644
@@ -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;
 }
 
Signature · 5 lines
1.8.4.2


-- 
Dmitry
#1 lore raw

Dmitry,

Do you want this patch to go separatly or do you want me to bundle it with my other changes(probably the first one)?
Also, offtopic, do you want me to backport this changes to 2.6 kernel that IMS uses or would you do it?

Thanks,

Quoted 34 lines · Dmitry Torokhov

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

---

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(-)
drivers/input/misc/ims-pcu.c +2 -3
index 4244f47..513ecdf 100644
@@ -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

author maintainer
#2 lore raw
Quoted 4 lines · Andrey Smirnov

Dmitry,

Do you want this patch to go separatly or do you want me to bundle it with my other changes(probably the first one)?

I'll apply it separately.

Quoted 2 lines

Also, offtopic, do you want me to backport this changes to 2.6 kernel that IMS uses or would you do it?

It should apply as is, no backport needed as far as I can tell.

Signature · 1 line
Dmitry