Commit d9134bd7 authored by Sakari Ailus's avatar Sakari Ailus Committed by Hans Verkuil

media: v4l2-ctrls: Return handler error in creating new fwnode properties

If the control handler is in an error state, return that error immediately
in v4l2_ctrl_new_fwnode_properties(). Effectively the change here is that
the same error code (handler's error) is returned in all cases instead of
possibly returning -EINVAL.
Signed-off-by: default avatarSakari Ailus <sakari.ailus@linux.intel.com>
Reviewed-by: default avatarUmang Jain <umang.jain@ideasonboard.com>
Signed-off-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
parent e490d3ee
......@@ -2567,6 +2567,9 @@ int v4l2_ctrl_new_fwnode_properties(struct v4l2_ctrl_handler *hdl,
const struct v4l2_ctrl_ops *ctrl_ops,
const struct v4l2_fwnode_device_properties *p)
{
if (hdl->error)
return hdl->error;
if (p->orientation != V4L2_FWNODE_PROPERTY_UNSET) {
u32 orientation_ctrl;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment