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

[media] rcar-vin: add missing error check to propagate error

The return value of __rvin_try_format_source is not checked, add a check
and propagate the error.
Signed-off-by: default avatarNiklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Reviewed-by: default avatarLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
parent f8a668f7
...@@ -208,6 +208,7 @@ static int __rvin_try_format(struct rvin_dev *vin, ...@@ -208,6 +208,7 @@ static int __rvin_try_format(struct rvin_dev *vin,
{ {
const struct rvin_video_format *info; const struct rvin_video_format *info;
u32 rwidth, rheight, walign; u32 rwidth, rheight, walign;
int ret;
/* Requested */ /* Requested */
rwidth = pix->width; rwidth = pix->width;
...@@ -235,7 +236,9 @@ static int __rvin_try_format(struct rvin_dev *vin, ...@@ -235,7 +236,9 @@ static int __rvin_try_format(struct rvin_dev *vin,
pix->sizeimage = 0; pix->sizeimage = 0;
/* Limit to source capabilities */ /* Limit to source capabilities */
__rvin_try_format_source(vin, which, pix, source); ret = __rvin_try_format_source(vin, which, pix, source);
if (ret)
return ret;
switch (pix->field) { switch (pix->field) {
case V4L2_FIELD_TOP: case V4L2_FIELD_TOP:
......
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