summaryrefslogtreecommitdiff
path: root/drivers/media/i2c/adv7170.c
diff options
context:
space:
mode:
authorBaruch Siach <baruch@tkos.co.il>2017-01-03 23:22:43 +0300
committerMauro Carvalho Chehab <mchehab@s-opensource.com>2017-01-30 20:47:05 +0300
commit5f98e5f555d770e807a7d89868f3619b6525d46d (patch)
treee91a85248a60c18fcd44ae4ff0ce84f0c76b7bca /drivers/media/i2c/adv7170.c
parent30e0e2ed7cf60944e810201aeff5974b5959aec5 (diff)
downloadlinux-5f98e5f555d770e807a7d89868f3619b6525d46d.tar.xz
[media] adv7170: drop redundant ret local
Simplifies return value logic of adv7170_set_fmt(). Signed-off-by: Baruch Siach <baruch@tkos.co.il> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'drivers/media/i2c/adv7170.c')
-rw-r--r--drivers/media/i2c/adv7170.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/media/i2c/adv7170.c b/drivers/media/i2c/adv7170.c
index 71eb335c6fd9..739331473429 100644
--- a/drivers/media/i2c/adv7170.c
+++ b/drivers/media/i2c/adv7170.c
@@ -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;
}
/* ----------------------------------------------------------------------- */