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

Commit 5f98e5f5 authored by Baruch Siach's avatar Baruch Siach Committed by Mauro Carvalho Chehab
Browse files

[media] adv7170: drop redundant ret local



Simplifies return value logic of adv7170_set_fmt().

Signed-off-by: default avatarBaruch Siach <baruch@tkos.co.il>
Signed-off-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
parent 30e0e2ed
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -298,7 +298,6 @@ static int adv7170_set_fmt(struct v4l2_subdev *sd,
{
	struct v4l2_mbus_framefmt *mf = &format->format;
	u8 val = adv7170_read(sd, 0x7);
	int ret = 0;

	if (format->pad)
		return -EINVAL;
@@ -319,9 +318,9 @@ static int adv7170_set_fmt(struct v4l2_subdev *sd,
	}

	if (format->which == V4L2_SUBDEV_FORMAT_ACTIVE)
		ret = adv7170_write(sd, 0x7, val);
		return adv7170_write(sd, 0x7, val);

	return ret;
	return 0;
}

/* ----------------------------------------------------------------------- */