Simplifies return value logic of adv7170_set_fmt().

Signed-off-by: Baruch Siach <bar...@tkos.co.il>
---
 drivers/media/i2c/adv7170.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/media/i2c/adv7170.c b/drivers/media/i2c/adv7170.c
index fc9ec0f3679c..9b0d6a4973c0 100644
--- a/drivers/media/i2c/adv7170.c
+++ b/drivers/media/i2c/adv7170.c
@@ -302,7 +302,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;
@@ -323,9 +322,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;
 }
 
 /* ----------------------------------------------------------------------- */
-- 
2.11.0

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to