Commit d64fe06e authored by Varsha Rao's avatar Varsha Rao Committed by Greg Kroah-Hartman

staging: media: atomisp: Compress return logic into one line.

Simplify function return by merging assignment and return into a single
line. The following coccinelle script is used to fix this issue.

@@
expression e;
local idexpression ret;
@@

-ret = e;
-return ret;
+return e;

This patch also removes unnecessary declarations.
Signed-off-by: default avatarVarsha Rao <rvarsha016@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 87bb4017
...@@ -541,10 +541,7 @@ static int __gc2235_init(struct v4l2_subdev *sd) ...@@ -541,10 +541,7 @@ static int __gc2235_init(struct v4l2_subdev *sd)
static int is_init; static int is_init;
static int gc2235_init(struct v4l2_subdev *sd) static int gc2235_init(struct v4l2_subdev *sd)
{ {
int ret = 0; return __gc2235_init(sd);
ret = __gc2235_init(sd);
return ret;
} }
static int power_ctrl(struct v4l2_subdev *sd, bool flag) static int power_ctrl(struct v4l2_subdev *sd, bool flag)
...@@ -585,9 +582,7 @@ static int gpio_ctrl(struct v4l2_subdev *sd, bool flag) ...@@ -585,9 +582,7 @@ static int gpio_ctrl(struct v4l2_subdev *sd, bool flag)
ret |= dev->platform_data->gpio1_ctrl(sd, !flag); ret |= dev->platform_data->gpio1_ctrl(sd, !flag);
usleep_range(60, 90); usleep_range(60, 90);
ret = dev->platform_data->gpio0_ctrl(sd, flag); return dev->platform_data->gpio0_ctrl(sd, flag);
return ret;
} }
static int power_up(struct v4l2_subdev *sd) static int power_up(struct v4l2_subdev *sd)
......
...@@ -2206,9 +2206,7 @@ static struct i2c_driver ov8858_driver = { ...@@ -2206,9 +2206,7 @@ static struct i2c_driver ov8858_driver = {
static __init int ov8858_init_mod(void) static __init int ov8858_init_mod(void)
{ {
int ret; return i2c_add_driver(&ov8858_driver);
ret = i2c_add_driver(&ov8858_driver);
return ret;
} }
static __exit void ov8858_exit_mod(void) static __exit void ov8858_exit_mod(void)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment