[<prev] [next>] [day] [month] [year] [list]
Message-Id: <1403271526-16947-1-git-send-email-rickard_strandqvist@spectrumdigital.se>
Date: Fri, 20 Jun 2014 15:38:46 +0200
From: Rickard Strandqvist <rickard_strandqvist@...ctrumdigital.se>
To: Grant Likely <grant.likely@...aro.org>,
Rob Herring <robh+dt@...nel.org>
Cc: Rickard Strandqvist <rickard_strandqvist@...ctrumdigital.se>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Philipp Zabel <p.zabel@...gutronix.de>,
Sascha Hauer <s.hauer@...gutronix.de>,
Fabio Estevam <fabio.estevam@...escale.com>,
Russell King <rmk+kernel@....linux.org.uk>,
linux-kernel@...r.kernel.org, devicetree@...r.kernel.org
Subject: [PATCH] gpu: ipu-v3: ipu-common.c: Cleaning up return of uninitialized variable
Before when there was an error a uninitialized variable would be returnd.
Now it returns -ENODEV
This was found using a static code analysis program called cppcheck.
Signed-off-by: Rickard Strandqvist <rickard_strandqvist@...ctrumdigital.se>
---
drivers/gpu/ipu-v3/ipu-common.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/ipu-v3/ipu-common.c b/drivers/gpu/ipu-v3/ipu-common.c
index 04e7b2e..d01c77d 100644
--- a/drivers/gpu/ipu-v3/ipu-common.c
+++ b/drivers/gpu/ipu-v3/ipu-common.c
@@ -1092,7 +1092,7 @@ static int ipu_add_client_devices(struct ipu_soc *ipu, unsigned long ipu_base)
{
struct device *dev = ipu->dev;
unsigned i;
- int id, ret;
+ int id;
mutex_lock(&ipu_client_id_mutex);
id = ipu_client_id;
@@ -1125,7 +1125,7 @@ static int ipu_add_client_devices(struct ipu_soc *ipu, unsigned long ipu_base)
err_register:
platform_device_unregister_children(to_platform_device(dev));
- return ret;
+ return -ENODEV;
}
--
1.7.10.4
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists