From 9d2fe9ae298d6144546e168d4b0067b2340ec246 Mon Sep 17 00:00:00 2001 From: Markus Elfring Date: Tue, 11 Oct 2016 08:43:25 -0300 Subject: [PATCH] [media] DaVinci-VPBE: Return an error code only as a constant in vpbe_probe() * 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 Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab --- drivers/media/platform/davinci/vpbe.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/media/platform/davinci/vpbe.c b/drivers/media/platform/davinci/vpbe.c index c8c69442c793..3ac4ba35832a 100644 --- a/drivers/media/platform/davinci/vpbe.c +++ b/drivers/media/platform/davinci/vpbe.c @@ -818,7 +818,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"); @@ -830,7 +829,7 @@ static int vpbe_probe(struct platform_device *pdev) !cfg->osd.module_name[0] || !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); -- 2.39.5