Commit 64663531 authored by Niklas Söderlund's avatar Niklas Söderlund Committed by Mauro Carvalho Chehab

[media] rcar-vin: do not use v4l2_device_call_until_err()

Fix a error from the original driver where v4l2_device_call_until_err()
where used for the pad specific v4l2 operation set_fmt.  Also fix up the
error path from this fix so if there is an error it will be propagated
to the caller.

The error path label have also been renamed as a result from a
nitpicking review comment since we are fixing other issues here.
Signed-off-by: default avatarNiklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Signed-off-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
parent fc738177
...@@ -114,10 +114,9 @@ static int __rvin_try_format_source(struct rvin_dev *vin, ...@@ -114,10 +114,9 @@ static int __rvin_try_format_source(struct rvin_dev *vin,
format.pad = vin->src_pad_idx; format.pad = vin->src_pad_idx;
ret = v4l2_device_call_until_err(sd->v4l2_dev, 0, pad, set_fmt, ret = v4l2_subdev_call(sd, pad, set_fmt, pad_cfg, &format);
pad_cfg, &format); if (ret < 0 && ret != -ENOIOCTLCMD)
if (ret < 0) goto done;
goto cleanup;
v4l2_fill_pix_format(pix, &format.format); v4l2_fill_pix_format(pix, &format.format);
...@@ -127,9 +126,9 @@ static int __rvin_try_format_source(struct rvin_dev *vin, ...@@ -127,9 +126,9 @@ static int __rvin_try_format_source(struct rvin_dev *vin,
vin_dbg(vin, "Source resolution: %ux%u\n", source->width, vin_dbg(vin, "Source resolution: %ux%u\n", source->width,
source->height); source->height);
cleanup: done:
v4l2_subdev_free_pad_config(pad_cfg); v4l2_subdev_free_pad_config(pad_cfg);
return 0; return ret;
} }
static int __rvin_try_format(struct rvin_dev *vin, static int __rvin_try_format(struct rvin_dev *vin,
......
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