[PATCH 39/46] [media] davinci: just return 0 instead of using a var

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[PATCH 39/46] [media] davinci: just return 0 instead of using a var

Mauro Carvalho Chehab-3
Instead of allocating a var to store 0 and just return it,
change the code to return 0 directly.

Signed-off-by: Mauro Carvalho Chehab <[hidden email]>

diff --git a/drivers/media/platform/davinci/vpfe_capture.c b/drivers/media/platform/davinci/vpfe_capture.c
index ed9dd27e3c63..c557eb5ebf6b 100644
--- a/drivers/media/platform/davinci/vpfe_capture.c
+++ b/drivers/media/platform/davinci/vpfe_capture.c
@@ -943,12 +943,11 @@ static int vpfe_g_fmt_vid_cap(struct file *file, void *priv,
  struct v4l2_format *fmt)
 {
  struct vpfe_device *vpfe_dev = video_drvdata(file);
- int ret = 0;
 
  v4l2_dbg(1, debug, &vpfe_dev->v4l2_dev, "vpfe_g_fmt_vid_cap\n");
  /* Fill in the information about format */
  *fmt = vpfe_dev->fmt;
- return ret;
+ return 0;
 }
 
 static int vpfe_enum_fmt_vid_cap(struct file *file, void  *priv,
--
1.9.3

_______________________________________________
Davinci-linux-open-source mailing list
[hidden email]
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [PATCH 39/46] [media] davinci: just return 0 instead of using a var

Lad, Prabhakar
On Wed, Sep 3, 2014 at 9:33 PM, Mauro Carvalho Chehab
<[hidden email]> wrote:
> Instead of allocating a var to store 0 and just return it,
> change the code to return 0 directly.
>

Acked-by: Lad, Prabhakar <[hidden email]>

Regards,
--Prabhakar Lad

> Signed-off-by: Mauro Carvalho Chehab <[hidden email]>
>
> diff --git a/drivers/media/platform/davinci/vpfe_capture.c b/drivers/media/platform/davinci/vpfe_capture.c
> index ed9dd27e3c63..c557eb5ebf6b 100644
> --- a/drivers/media/platform/davinci/vpfe_capture.c
> +++ b/drivers/media/platform/davinci/vpfe_capture.c
> @@ -943,12 +943,11 @@ static int vpfe_g_fmt_vid_cap(struct file *file, void *priv,
>                                 struct v4l2_format *fmt)
>  {
>         struct vpfe_device *vpfe_dev = video_drvdata(file);
> -       int ret = 0;
>
>         v4l2_dbg(1, debug, &vpfe_dev->v4l2_dev, "vpfe_g_fmt_vid_cap\n");
>         /* Fill in the information about format */
>         *fmt = vpfe_dev->fmt;
> -       return ret;
> +       return 0;
>  }
>
>  static int vpfe_enum_fmt_vid_cap(struct file *file, void  *priv,
> --
> 1.9.3
>
_______________________________________________
Davinci-linux-open-source mailing list
[hidden email]
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source
Loading...