diff options
author | Nathan Chancellor <natechancellor@gmail.com> | 2018-09-21 02:04:20 +0200 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2018-09-21 03:28:09 +0200 |
commit | 5a7d7d0f9f791b1e13f26dbbb07c86482912ad62 (patch) | |
tree | 04c2c2250bee7f16de144f818744fb80011401f2 /drivers/regulator/da9055-regulator.c | |
parent | regulator: qcom: Add PMS405 regulators (diff) | |
download | linux-5a7d7d0f9f791b1e13f26dbbb07c86482912ad62.tar.xz linux-5a7d7d0f9f791b1e13f26dbbb07c86482912ad62.zip |
regulator: da905{2,5}: Remove unnecessary array check
Clang warns that the address of a pointer will always evaluated as true
in a boolean context:
drivers/regulator/da9052-regulator.c:423:22: warning: address of array
'pdata->regulators' will always evaluate to 'true'
[-Wpointer-bool-conversion]
if (pdata && pdata->regulators) {
~~ ~~~~~~~^~~~~~~~~~
drivers/regulator/da9055-regulator.c:615:22: warning: address of array
'pdata->regulators' will always evaluate to 'true'
[-Wpointer-bool-conversion]
if (pdata && pdata->regulators) {
~~ ~~~~~~~^~~~~~~~~~
Link: https://github.com/ClangBuiltLinux/linux/issues/142
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/regulator/da9055-regulator.c')
-rw-r--r-- | drivers/regulator/da9055-regulator.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/regulator/da9055-regulator.c b/drivers/regulator/da9055-regulator.c index f40c3b8644ae..588c3d2445cf 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, |