Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ad7647d9 authored by Dmitry Torokhov's avatar Dmitry Torokhov
Browse files

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: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
parent e3480a61
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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;
}