]> git.baikalelectronics.ru Git - kernel.git/commit
regulator: da905{2,5}: Remove unnecessary array check
authorNathan Chancellor <natechancellor@gmail.com>
Fri, 21 Sep 2018 00:04:20 +0000 (17:04 -0700)
committerMark Brown <broonie@kernel.org>
Fri, 21 Sep 2018 01:28:09 +0000 (18:28 -0700)
commit533362dcadd69140e437989474cadc50082b2cb4
tree04c2c2250bee7f16de144f818744fb80011401f2
parent66ad6748af46b3e1a8f62c7e6565639dca3b68eb
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>
drivers/regulator/da9052-regulator.c
drivers/regulator/da9055-regulator.c