diff options
author | Mauro Carvalho Chehab <mchehab@kernel.org> | 2022-03-07 16:43:02 +0100 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@kernel.org> | 2022-03-07 16:43:14 +0100 |
commit | 12fdba564afd1f80eeaeed55c1c81761addda161 (patch) | |
tree | 7e1f9d0261cac298ed62ae54f34658ece4a3d96d /drivers/media/v4l2-core | |
parent | 5ad05ecad4326ddaa26a83ba2233a67be24c1aaa (diff) | |
parent | 3d1e4228c9dd5c945a5cb621749f358766ee5777 (diff) |
Merge tag 'for-5.18-2.6-signed' of git://linuxtv.org/sailus/media_tree into media_stage
Even yet more V4L2 patches for 5.18
* tag 'for-5.18-2.6-signed' of git://linuxtv.org/sailus/media_tree:
media: i2c: Fix pixel array positions in ov8865
media: adv7183: Convert to GPIO descriptors
media: m5mols: Convert to use GPIO descriptors
media: noon010p30: Convert to use GPIO descriptors
media: mt9m111: Drop unused include
media: adv7511: Drop unused include
media: i2c: isl7998x: Add driver for Intersil ISL7998x
media: dt-bindings: Add Intersil ISL79987 DT bindings
media: media-entity: Clarify media_entity_cleanup() usage
media: i2c: imx274: Drop surplus includes
media: i2c: ccs: Drop unused include
v4l: fwnode: Remove now-redundant loop from v4l2_fwnode_parse_reference()
v4l: fwnode: Drop redunant -ENODATA check in property reference parsing
media: media-entity: Simplify media_pipeline_start()
media: media-entity: Add media_pad_is_streaming() helper function
media: Add a driver for the og01a1b camera sensor
media: i2c: ov5648: Fix lockdep error
media: ov5640: Fix set format, v4l2_mbus_pixelcode not updated
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
Diffstat (limited to 'drivers/media/v4l2-core')
-rw-r--r-- | drivers/media/v4l2-core/v4l2-fwnode.c | 28 |
1 files changed, 8 insertions, 20 deletions
diff --git a/drivers/media/v4l2-core/v4l2-fwnode.c b/drivers/media/v4l2-core/v4l2-fwnode.c index 71dcc9a96535..afceb35e500c 100644 --- a/drivers/media/v4l2-core/v4l2-fwnode.c +++ b/drivers/media/v4l2-core/v4l2-fwnode.c @@ -894,25 +894,8 @@ static int v4l2_fwnode_reference_parse(struct device *dev, int ret; for (index = 0; - !(ret = fwnode_property_get_reference_args(dev_fwnode(dev), - prop, NULL, 0, - index, &args)); - index++) - fwnode_handle_put(args.fwnode); - - if (!index) - return -ENOENT; - - /* - * Note that right now both -ENODATA and -ENOENT may signal - * out-of-bounds access. Return the error in cases other than that. - */ - if (ret != -ENOENT && ret != -ENODATA) - return ret; - - for (index = 0; - !fwnode_property_get_reference_args(dev_fwnode(dev), prop, NULL, - 0, index, &args); + !(ret = fwnode_property_get_reference_args(dev_fwnode(dev), prop, + NULL, 0, index, &args)); index++) { struct v4l2_async_subdev *asd; @@ -928,7 +911,12 @@ static int v4l2_fwnode_reference_parse(struct device *dev, } } - return 0; + /* -ENOENT here means successful parsing */ + if (ret != -ENOENT) + return ret; + + /* Return -ENOENT if no references were found */ + return index ? 0 : -ENOENT; } /* |