* [PATCH] regulator: da9052: remove null pointer check on array pdata->regulators
@ 2016-09-08 10:07 Colin King
2016-09-12 23:51 ` Mark Brown
0 siblings, 1 reply; 2+ messages in thread
From: Colin King @ 2016-09-08 10:07 UTC (permalink / raw)
To: Support Opensource, Liam Girdwood, Mark Brown; +Cc: linux-kernel
From: Colin Ian King <colin.king@canonical.com>
pdata->regulators is an array of DA9052_MAX_REGULATORS struct
regulator_init_data pointers hence cannot be null, so the null pointer
check on pdata->regulators is redundant. Remove it.
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
drivers/regulator/da9052-regulator.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/regulator/da9052-regulator.c b/drivers/regulator/da9052-regulator.c
index 9ececfe..37e4025 100644
--- a/drivers/regulator/da9052-regulator.c
+++ b/drivers/regulator/da9052-regulator.c
@@ -420,7 +420,7 @@ static int da9052_regulator_probe(struct platform_device *pdev)
config.dev = &pdev->dev;
config.driver_data = regulator;
config.regmap = da9052->regmap;
- if (pdata && pdata->regulators) {
+ if (pdata) {
config.init_data = pdata->regulators[cell->id];
} else {
#ifdef CONFIG_OF
--
2.9.3
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-09-12 23:51 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-08 10:07 [PATCH] regulator: da9052: remove null pointer check on array pdata->regulators Colin King
2016-09-12 23:51 ` Mark Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®