]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
[media] adv7170: drop redundant ret local
authorBaruch Siach <baruch@tkos.co.il>
Tue, 3 Jan 2017 20:22:43 +0000 (18:22 -0200)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Mon, 30 Jan 2017 17:47:05 +0000 (15:47 -0200)
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>
drivers/media/i2c/adv7170.c

index 71eb335c6fd9ced5b2e50186b28ee86a367f29d5..73933147342947387555c8eb35951262f6c7bc07 100644 (file)
@@ -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;
 }
 
 /* ----------------------------------------------------------------------- */