mirror of https://gitee.com/openkylin/linux.git
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: Varsha Rao <rvarsha016@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
87bb40171c
commit
d64fe06e1e
|
@ -541,10 +541,7 @@ static int __gc2235_init(struct v4l2_subdev *sd)
|
|||
static int is_init;
|
||||
static int gc2235_init(struct v4l2_subdev *sd)
|
||||
{
|
||||
int ret = 0;
|
||||
ret = __gc2235_init(sd);
|
||||
|
||||
return ret;
|
||||
return __gc2235_init(sd);
|
||||
}
|
||||
|
||||
static int power_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);
|
||||
usleep_range(60, 90);
|
||||
ret = dev->platform_data->gpio0_ctrl(sd, flag);
|
||||
|
||||
return ret;
|
||||
return dev->platform_data->gpio0_ctrl(sd, flag);
|
||||
}
|
||||
|
||||
static int power_up(struct v4l2_subdev *sd)
|
||||
|
|
|
@ -2206,9 +2206,7 @@ static struct i2c_driver ov8858_driver = {
|
|||
|
||||
static __init int ov8858_init_mod(void)
|
||||
{
|
||||
int ret;
|
||||
ret = i2c_add_driver(&ov8858_driver);
|
||||
return ret;
|
||||
return i2c_add_driver(&ov8858_driver);
|
||||
}
|
||||
|
||||
static __exit void ov8858_exit_mod(void)
|
||||
|
|
Loading…
Reference in New Issue