davinci: remove an unneeded check
Subsystems (2)
PATCH 1/1 davinci: remove an unneeded check
We don't need to check "ret", we know it's zero.
Signed-off-by Dan Carpenter <[email protected]>
drivers/media/platform/davinci/vpfe_capture.c +4 -5
@@ -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)
Hi Dan,
Thanks for the patch!
Quoted 3 lines · Dan Carpenter
We don't need to check "ret", we know it's zero.
Signed-off-by Dan Carpenter <[email protected]>
Acked-by Lad, Prabhakar <[email protected]>
Regards,
--Prabhakar Lad
Quoted 21 lines
drivers/media/platform/davinci/vpfe_capture.c +4
-5@@ -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)