Commit ca7948aa authored by Markus Elfring's avatar Markus Elfring Committed by Mauro Carvalho Chehab

[media] DaVinci-VPBE: Return the success indication only as a constant in vpbe_set_mode()

* Return a success code without storing it in an intermediate variable.

* Delete the local variable "ret" which became unnecessary with
  this refactoring.
Signed-off-by: default avatarMarkus Elfring <elfring@users.sourceforge.net>
Signed-off-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
parent 9d2fe9ae
...@@ -509,7 +509,6 @@ static int vpbe_set_mode(struct vpbe_device *vpbe_dev, ...@@ -509,7 +509,6 @@ static int vpbe_set_mode(struct vpbe_device *vpbe_dev,
struct v4l2_dv_timings dv_timings; struct v4l2_dv_timings dv_timings;
struct osd_state *osd_device; struct osd_state *osd_device;
int out_index = vpbe_dev->current_out_index; int out_index = vpbe_dev->current_out_index;
int ret = 0;
int i; int i;
if (!mode_info || !mode_info->name) if (!mode_info || !mode_info->name)
...@@ -549,8 +548,7 @@ static int vpbe_set_mode(struct vpbe_device *vpbe_dev, ...@@ -549,8 +548,7 @@ static int vpbe_set_mode(struct vpbe_device *vpbe_dev,
vpbe_dev->current_timings.upper_margin); vpbe_dev->current_timings.upper_margin);
mutex_unlock(&vpbe_dev->lock); mutex_unlock(&vpbe_dev->lock);
return 0;
return ret;
} }
static int vpbe_set_default_mode(struct vpbe_device *vpbe_dev) static int vpbe_set_default_mode(struct vpbe_device *vpbe_dev)
......
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