summaryrefslogtreecommitdiff
path: root/drivers/media/v4l2-core
diff options
context:
space:
mode:
authorSakari Ailus <sakari.ailus@linux.intel.com>2024-04-12 15:56:49 +0300
committerHans Verkuil <hverkuil-cisco@xs4all.nl>2024-04-22 11:41:04 +0200
commitd9134bd7bb6c5fe289f17d44a9e8b4c53e26f099 (patch)
treef5c5d0a1e127e031c750390a591d42b028e8cadb /drivers/media/v4l2-core
parente490d3ee39da707e4eafed9c1b48749c7e4e7782 (diff)
downloadlwn-d9134bd7bb6c5fe289f17d44a9e8b4c53e26f099.tar.gz
lwn-d9134bd7bb6c5fe289f17d44a9e8b4c53e26f099.zip
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: Sakari Ailus <sakari.ailus@linux.intel.com> Reviewed-by: Umang Jain <umang.jain@ideasonboard.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Diffstat (limited to 'drivers/media/v4l2-core')
-rw-r--r--drivers/media/v4l2-core/v4l2-ctrls-core.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/media/v4l2-core/v4l2-ctrls-core.c b/drivers/media/v4l2-core/v4l2-ctrls-core.c
index 9a09a981e1d9..c59dd691f79f 100644
--- a/drivers/media/v4l2-core/v4l2-ctrls-core.c
+++ b/drivers/media/v4l2-core/v4l2-ctrls-core.c
@@ -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;