media: i2c: st-mipid02: fix mipid02_stream_enable error handling
authorAlain Volmat <alain.volmat@foss.st.com>
Tue, 8 Oct 2024 11:46:05 +0000 (13:46 +0200)
committerHans Verkuil <hverkuil@xs4all.nl>
Thu, 7 Nov 2024 08:05:58 +0000 (09:05 +0100)
commitd5c7cc28aa9b58b8bb4ab4b501d2f7e15cc5c0e9
tree9fb8f5affba3f713e44e6b5f88dd0b9b8268ff53
parent8a2189be8599842406450544eb6b8fd885e2ce58
media: i2c: st-mipid02: fix mipid02_stream_enable error handling

Following addition of cascaded s_stream call within
mipid02_stream_enable and mipid02_stream_disable,
the mipid02_stream_enable error handling must be fixed to simply
disable the clocks & data lanes without also calling
again the s_stream of the source subdev.

Moreover, main control registers are reset to 0 for all cases
of error within the mipid02_stream_enable even if they haven't yet
been written. Correct this behavior by simply returning an
error when register clear are not necessary.

Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
drivers/media/i2c/st-mipid02.c