[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20170221051736.GA7991@embeddedgus>
Date: Mon, 20 Feb 2017 23:17:36 -0600
From: "Gustavo A. R. Silva" <garsilva@...eddedor.com>
To: lgirdwood@...il.com, broonie@...nel.org,
support.opensource@...semi.com
Cc: linux-kernel@...r.kernel.org,
"Gustavo A. R. Silva" <garsilva@...eddedor.com>,
Peter Senna Tschudin <peter.senna@...il.com>
Subject: [PATCH] regulator: remove unnecessary code
The name of an array used by itself will always return the array's address.
So it makes no sense to evaluate it, since the test will always evaluate as
true.
Addresses-Coverity-ID: 751412
Signed-off-by: Gustavo A. R. Silva <garsilva@...eddedor.com>
---
drivers/regulator/da9055-regulator.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/regulator/da9055-regulator.c b/drivers/regulator/da9055-regulator.c
index d029c94..a118f63 100644
--- a/drivers/regulator/da9055-regulator.c
+++ b/drivers/regulator/da9055-regulator.c
@@ -612,7 +612,7 @@ static int da9055_regulator_probe(struct platform_device *pdev)
config.driver_data = regulator;
config.regmap = da9055->regmap;
- if (pdata && pdata->regulators) {
+ if (pdata) {
config.init_data = pdata->regulators[pdev->id];
} else {
ret = da9055_regulator_dt_init(pdev, regulator, &config,
--
2.5.0
Powered by blists - more mailing lists