[patch] [media] davinci: remove an unneeded check

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

[patch] [media] davinci: remove an unneeded check

Dan Carpenter
We don't need to check "ret", we know it's zero.

Signed-off-by: Dan Carpenter <[hidden email]>

diff --git a/drivers/media/platform/davinci/vpfe_capture.c b/drivers/media/platform/davinci/vpfe_capture.c
index c557eb5..3eb6e4b 100644
--- a/drivers/media/platform/davinci/vpfe_capture.c
+++ b/drivers/media/platform/davinci/vpfe_capture.c
@@ -442,11 +442,10 @@ static int vpfe_config_image_format(struct vpfe_device *vpfe_dev,
  return ret;
 
  /* Update the values of sizeimage and bytesperline */
- if (!ret) {
- pix->bytesperline = ccdc_dev->hw_ops.get_line_length();
- pix->sizeimage = pix->bytesperline * pix->height;
- }
- return ret;
+ pix->bytesperline = ccdc_dev->hw_ops.get_line_length();
+ pix->sizeimage = pix->bytesperline * pix->height;
+
+ return 0;
 }
 
 static int vpfe_initialize_device(struct vpfe_device *vpfe_dev)
_______________________________________________
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] [media] davinci: remove an unneeded check

Lad, Prabhakar
Hi Dan,

Thanks for the patch!

On Mon, Sep 22, 2014 at 9:00 AM, Dan Carpenter <[hidden email]> wrote:
> We don't need to check "ret", we know it's zero.
>
> Signed-off-by: Dan Carpenter <[hidden email]>

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

Regards,
--Prabhakar Lad

>
> diff --git a/drivers/media/platform/davinci/vpfe_capture.c b/drivers/media/platform/davinci/vpfe_capture.c
> index c557eb5..3eb6e4b 100644
> --- a/drivers/media/platform/davinci/vpfe_capture.c
> +++ b/drivers/media/platform/davinci/vpfe_capture.c
> @@ -442,11 +442,10 @@ static int vpfe_config_image_format(struct vpfe_device *vpfe_dev,
>                 return ret;
>
>         /* Update the values of sizeimage and bytesperline */
> -       if (!ret) {
> -               pix->bytesperline = ccdc_dev->hw_ops.get_line_length();
> -               pix->sizeimage = pix->bytesperline * pix->height;
> -       }
> -       return ret;
> +       pix->bytesperline = ccdc_dev->hw_ops.get_line_length();
> +       pix->sizeimage = pix->bytesperline * pix->height;
> +
> +       return 0;
>  }
>
>  static int vpfe_initialize_device(struct vpfe_device *vpfe_dev)
_______________________________________________
Davinci-linux-open-source mailing list
[hidden email]
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source
Loading...