OSDN Git Service

media: ov7670: Remove useless use of a ret variable
authorSakari Ailus <sakari.ailus@linux.intel.com>
Tue, 15 Jan 2019 08:54:44 +0000 (06:54 -0200)
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>
Fri, 25 Jan 2019 12:38:59 +0000 (10:38 -0200)
Instead of assigning the return value to ret and then checking and
returning it, just return the value to the caller directly. The success
value is always 0.

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Acked-by: Lubomir Rintel <lkundrak@v3.sk>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
drivers/media/i2c/ov7670.c

index 4939a83..61c47c6 100644 (file)
@@ -859,11 +859,7 @@ static int ov7675_set_framerate(struct v4l2_subdev *sd,
        /* Recalculate frame rate */
        ov7675_get_framerate(sd, tpf);
 
-       ret = ov7670_write(sd, REG_CLKRC, info->clkrc);
-       if (ret < 0)
-               return ret;
-
-       return 0;
+       return ov7670_write(sd, REG_CLKRC, info->clkrc);
 }
 
 static void ov7670_get_framerate_legacy(struct v4l2_subdev *sd,