Commit 34d340b7 authored by Srishti Sharma's avatar Srishti Sharma Committed by Mauro Carvalho Chehab

media: Staging: media: atomisp: Merge assignment with return

Merge the assignment and the return statements to return the value
directly. Done using the following semantic patch by coccinelle.

@@
local idexpression ret;
expression e;
@@

-ret =
+return
     e;
-return ret;
Signed-off-by: default avatarSrishti Sharma <srishtishar@gmail.com>
Acked-by: default avatarJulia Lawall <julia.lawall@lip6.fr>
Signed-off-by: default avatarSakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
parent 866af46e
...@@ -945,12 +945,8 @@ static int ad5823_t_focus_vcm(struct v4l2_subdev *sd, u16 val) ...@@ -945,12 +945,8 @@ static int ad5823_t_focus_vcm(struct v4l2_subdev *sd, u16 val)
int ad5823_t_focus_abs(struct v4l2_subdev *sd, s32 value) int ad5823_t_focus_abs(struct v4l2_subdev *sd, s32 value)
{ {
int ret;
value = min(value, AD5823_MAX_FOCUS_POS); value = min(value, AD5823_MAX_FOCUS_POS);
ret = ad5823_t_focus_vcm(sd, value); return ad5823_t_focus_vcm(sd, value);
return ret;
} }
static int ov5693_t_focus_abs(struct v4l2_subdev *sd, s32 value) static int ov5693_t_focus_abs(struct v4l2_subdev *sd, s32 value)
...@@ -1332,7 +1328,6 @@ static int power_ctrl(struct v4l2_subdev *sd, bool flag) ...@@ -1332,7 +1328,6 @@ static int power_ctrl(struct v4l2_subdev *sd, bool flag)
static int gpio_ctrl(struct v4l2_subdev *sd, bool flag) static int gpio_ctrl(struct v4l2_subdev *sd, bool flag)
{ {
int ret;
struct ov5693_device *dev = to_ov5693_sensor(sd); struct ov5693_device *dev = to_ov5693_sensor(sd);
if (!dev || !dev->platform_data) if (!dev || !dev->platform_data)
...@@ -1342,9 +1337,7 @@ static int gpio_ctrl(struct v4l2_subdev *sd, bool flag) ...@@ -1342,9 +1337,7 @@ static int gpio_ctrl(struct v4l2_subdev *sd, bool flag)
if (dev->platform_data->gpio_ctrl) if (dev->platform_data->gpio_ctrl)
return dev->platform_data->gpio_ctrl(sd, flag); return dev->platform_data->gpio_ctrl(sd, flag);
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)
......
...@@ -1168,13 +1168,9 @@ void hmm_bo_free_pages(struct hmm_buffer_object *bo) ...@@ -1168,13 +1168,9 @@ void hmm_bo_free_pages(struct hmm_buffer_object *bo)
int hmm_bo_page_allocated(struct hmm_buffer_object *bo) int hmm_bo_page_allocated(struct hmm_buffer_object *bo)
{ {
int ret;
check_bo_null_return(bo, 0); check_bo_null_return(bo, 0);
ret = bo->status & HMM_BO_PAGE_ALLOCED; return bo->status & HMM_BO_PAGE_ALLOCED;
return ret;
} }
/* /*
......
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