diff mbox

[05/34,media] DaVinci-VPBE: Return an error code only as a constant in vpbe_probe()

Message ID a73b4879-7f45-f863-fb11-73878d40674d@users.sourceforge.net (mailing list archive)
State New, archived
Headers show

Commit Message

SF Markus Elfring Oct. 12, 2016, 2:35 p.m. UTC
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Tue, 11 Oct 2016 13:43:25 +0200

* Return an error code without storing it in an intermediate variable.

* Delete the local variable "ret" which became unnecessary with
  this refactoring.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
 drivers/media/platform/davinci/vpbe.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
diff mbox

Patch

diff --git a/drivers/media/platform/davinci/vpbe.c b/drivers/media/platform/davinci/vpbe.c
index 625bddf..4c4cd81 100644
--- a/drivers/media/platform/davinci/vpbe.c
+++ b/drivers/media/platform/davinci/vpbe.c
@@ -821,7 +821,6 @@  static int vpbe_probe(struct platform_device *pdev)
 {
 	struct vpbe_device *vpbe_dev;
 	struct vpbe_config *cfg;
-	int ret = -EINVAL;
 
 	if (!pdev->dev.platform_data) {
 		v4l2_err(pdev->dev.driver, "No platform data\n");
@@ -834,7 +833,7 @@  static int vpbe_probe(struct platform_device *pdev)
 	    !cfg->venc.module_name[0]) {
 		v4l2_err(pdev->dev.driver,
 			 "vpbe display module names not defined\n");
-		return ret;
+		return -EINVAL;
 	}
 
 	vpbe_dev = kzalloc(sizeof(*vpbe_dev), GFP_KERNEL);