public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
* [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

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