]> www.infradead.org Git - users/jedix/linux-maple.git/commit
media: ar0521: Refactor ar0521_power_off()
authorRicardo Ribalda <ribalda@chromium.org>
Fri, 16 Aug 2024 12:31:59 +0000 (12:31 +0000)
committerHans Verkuil <hverkuil-cisco@xs4all.nl>
Sat, 31 Aug 2024 07:40:42 +0000 (09:40 +0200)
commit2933d7e12ed792e12ab690efd15f6e7ce81ba739
tree090e705270dc70ffe827876730bb329be8dff1e7
parent5256cfec79d8c9a6a6075b317c5a46ef9ff0038f
media: ar0521: Refactor ar0521_power_off()

Factor out all the power off logic, except the clk_disable_unprepare(),
to a new function __ar0521_power_off().

This allows ar0521_power_on() to explicitly clean-out the clock during
the error-path.

The following smatch warning is fixed:
drivers/media/i2c/ar0521.c:912 ar0521_power_on() warn: 'sensor->extclk' from clk_prepare_enable() not released on lines: 912.

Signed-off-by: Ricardo Ribalda <ribalda@chromium.org>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
drivers/media/i2c/ar0521.c