* [patch] [media] davinci: remove an unneeded check
@ 2014-09-22 8:00 Dan Carpenter
2014-09-23 6:36 ` Prabhakar Lad
0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2014-09-22 8:00 UTC (permalink / raw)
To: Lad, Prabhakar
Cc: Mauro Carvalho Chehab, linux-media, davinci-linux-open-source,
kernel-janitors
We don't need to check "ret", we know it's zero.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
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)
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [patch] [media] davinci: remove an unneeded check
2014-09-22 8:00 [patch] [media] davinci: remove an unneeded check Dan Carpenter
@ 2014-09-23 6:36 ` Prabhakar Lad
0 siblings, 0 replies; 2+ messages in thread
From: Prabhakar Lad @ 2014-09-23 6:36 UTC (permalink / raw)
To: Dan Carpenter; +Cc: Mauro Carvalho Chehab, linux-media, dlos, kernel-janitors
Hi Dan,
Thanks for the patch!
On Mon, Sep 22, 2014 at 9:00 AM, Dan Carpenter <dan.carpenter@oracle.com> wrote:
> We don't need to check "ret", we know it's zero.
>
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
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)
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-09-23 6:37 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-09-22 8:00 [patch] [media] davinci: remove an unneeded check Dan Carpenter
2014-09-23 6:36 ` Prabhakar Lad
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox