summaryrefslogtreecommitdiffstats
path: root/mm/mincore.c
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2018-07-06 11:37:18 +0300
committerMark Brown <broonie@kernel.org>2018-07-09 12:16:18 +0100
commit1aa1b918946537c089716bffd1399e30a2981cb7 (patch)
treeea264fedbe3475596fc68b8d2945e8f0f6207875 /mm/mincore.c
parented1ae2dd9f242c7a36e8e39100f6a7f6bcdfdd89 (diff)
downloadlinux-1aa1b918946537c089716bffd1399e30a2981cb7.tar.bz2
regulator: max8997: clean up a condition in max8997_list_voltage()
The current code generates a static cehcker warnings because "rid < 0" is always false: drivers/regulator/max8997-regulator.c:169 max8997_list_voltage() warn: condition is always false The problem is that because of type promotion, if "rid" is negative the comparison against ARRAY_SIZE() is type promoted to size_t and it's treated as a very high positive value. I've changed the order of the checks so now everyone is happy. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'mm/mincore.c')
0 files changed, 0 insertions, 0 deletions