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

media: rcar-vin: Fix incorrect return statement in rvin_try_format()

While refactoring code the return statement became corrupted, fix it by
returning the correct return code.
Reported-by: default avatarKieran Bingham <kieran.bingham+renesas@ideasonboard.com>
Fixes: 897e3713 ("media: rcar-vin: simplify how formats are set and reset"
Signed-off-by: default avatarNiklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Reviewed-by: default avatarLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: default avatarKieran Bingham <kieran.bingham+renesas@ideasonboard.com>
Signed-off-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+samsung@kernel.org>
parent f71193af
......@@ -208,6 +208,7 @@ static int rvin_try_format(struct rvin_dev *vin, u32 which,
ret = v4l2_subdev_call(sd, pad, set_fmt, pad_cfg, &format);
if (ret < 0 && ret != -ENOIOCTLCMD)
goto done;
ret = 0;
v4l2_fill_pix_format(pix, &format.format);
......@@ -242,7 +243,7 @@ static int rvin_try_format(struct rvin_dev *vin, u32 which,
done:
v4l2_subdev_free_pad_config(pad_cfg);
return 0;
return ret;
}
static int rvin_querycap(struct file *file, void *priv,
......
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