media: allegro: fix module removal if initialization failed
authorMichael Tretter <m.tretter@pengutronix.de>
Wed, 8 Sep 2021 13:03:11 +0000 (14:03 +0100)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Wed, 20 Oct 2021 14:52:50 +0000 (15:52 +0100)
commitdacc21d638c427a53448d91bd976ee6762822911
treedf45b6d6e0040e9b237474bd7f7a04232040a7bf
parent1ecda6393db4be44aba27a243e648dc98c9b92e3
media: allegro: fix module removal if initialization failed

If the module probe finished, but the firmware initialization failed,
removing the module must not revert the firmware initialization.

Add a field to track the status of the firmware initialization and only
roll it back, if the firmware was successfully initialized.

Signed-off-by: Michael Tretter <m.tretter@pengutronix.de>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
drivers/media/platform/allegro-dvt/allegro-core.c