From: Baruch Siach Date: Tue, 3 Jan 2017 20:22:43 +0000 (-0200) Subject: [media] adv7170: drop redundant ret local X-Git-Tag: v4.11-rc1~132^2~165 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=5f98e5f555d770e807a7d89868f3619b6525d46d;p=karo-tx-linux.git [media] adv7170: drop redundant ret local Simplifies return value logic of adv7170_set_fmt(). Signed-off-by: Baruch Siach Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab --- 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; } /* ----------------------------------------------------------------------- */