From: Sakari Ailus Date: Tue, 15 Jan 2019 08:54:44 +0000 (-0200) Subject: media: ov7670: Remove useless use of a ret variable X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=f1fb085562411f71ab9259fc131b78d93406c907;p=linux.git 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 Acked-by: Lubomir Rintel Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/i2c/ov7670.c b/drivers/media/i2c/ov7670.c index 4939a83b50e49..61c47c61c6933 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,