diff options
| author | 2026-09-30 14:41:37 +0800 | |
|---|---|---|
| committer | 2026-09-30 16:51:17 +0200 | |
| commit | 1b5b3b63f0c18de9f4570a8d1843431523dcb35a (patch) | |
| tree | 61b0ffd24ea5b5ef8668edc4d2a86cdf5fe305c6 /scripts/Makefile.thinlto | |
| parent | media: i2c: it6625: finish reverse fir-tree declaration order (diff) | |
media: i2c: it6625: fold subdev initialization into probe
it6625_init_v4l2_subdev() split subdev/control-handler/media-entity
initialization out of probe(), which made error handling harder to
follow across the two functions and forced probe() to normalize every
init_v4l2_subdev() failure to -ENOMEM regardless of the real error
(e.g. a media_entity_pads_init() failure was reported to the caller as
-ENOMEM instead of its actual code).
Inline it into it6625_probe() so initialization and its unwind path
are visible together, and propagate the real error from
it6625_v4l2_init_controls() instead of replacing it. Cleanup behavior
on each failure path is unchanged: it6625_v4l2_init_controls() already
frees the control handler internally before returning an error, and a
media_entity_pads_init() failure still frees it explicitly before
unwinding, so neither path double-frees it through the later
err_clean_hdl label.
State finalization (v4l2_subdev_init_finalize()/cleanup()) is
deliberately left for a follow-up change, to keep this a pure
restructuring and keep the locking-model transition atomic on its own.
Signed-off-by: Hermes Wu <Hermes.wu@ite.com.tw>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
Diffstat (limited to 'scripts/Makefile.thinlto')
0 files changed, 0 insertions, 0 deletions
