]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
media: v4l2-ctrls: Set error v4l2_ctrl_new_fwnode_properties consistently
authorSakari Ailus <sakari.ailus@linux.intel.com>
Tue, 11 Nov 2025 11:07:29 +0000 (13:07 +0200)
committerHans Verkuil <hverkuil+cisco@kernel.org>
Wed, 14 Jan 2026 22:33:02 +0000 (23:33 +0100)
commite3d5436c7099881e3604826757c8d65acc2d94f3
tree8358302d88b7b426cde869a14f7366036c92e16d
parent2759816f1682ca6a269064b7b9d50a65bc3afd5d
media: v4l2-ctrls: Set error v4l2_ctrl_new_fwnode_properties consistently

The vast majority of the callers of v4l2_ctrl_new_fwnode_properties() do
check the returned error code but the function does not set the control
handler's error on failure. This will make error handling more complicated
and prone for bugs.

Always assign the control handler's error field on error in
v4l2_ctrl_new_fwnode_properties().

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
drivers/media/v4l2-core/v4l2-ctrls-core.c
include/media/v4l2-ctrls.h