summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSakari Ailus <sakari.ailus@linux.intel.com>2019-01-15 06:54:44 -0200
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>2019-01-25 10:38:59 -0200
commitf1fb085562411f71ab9259fc131b78d93406c907 (patch)
tree2ddde63caca3e1d5b27f0edd6c74cf0efa7fc3cd
parent879347f0c258cffe27b9e28bd4f1f55fc019f857 (diff)
downloadlwn-f1fb085562411f71ab9259fc131b78d93406c907.tar.gz
lwn-f1fb085562411f71ab9259fc131b78d93406c907.zip
media: ov7670: Remove useless use of a ret variable
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>
-rw-r--r--drivers/media/i2c/ov7670.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/drivers/media/i2c/ov7670.c b/drivers/media/i2c/ov7670.c
index 4939a83b50e4..61c47c61c693 100644
--- a/drivers/media/i2c/ov7670.c
+++ b/drivers/media/i2c/ov7670.c
@@ -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,