Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

[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
Loading
Loading
Loading
Loading
+4 −1
Original line number Original line Diff line number Diff line
@@ -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,
	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: