]> git.baikalelectronics.ru Git - kernel.git/commit
iio: ms65611_core: Fixes dereferencing regulator pointer
authorCrt Mori <cmo@melexis.com>
Fri, 14 Oct 2016 13:43:14 +0000 (15:43 +0200)
committerJonathan Cameron <jic23@kernel.org>
Sun, 23 Oct 2016 18:33:50 +0000 (19:33 +0100)
commitf4d4e3e3bdfd40813861b45636326e3f0e4a1188
treec2fc7040f4bf98db472585799c36fc6b9ea36ab5
parentace42c1c4bb8e8ac17d7351d91a6cdf44cf04b6b
iio: ms65611_core: Fixes dereferencing regulator pointer

Change in handling of the regulator description means that static
checkers correctly assume we could be using dereferenced pointer to the
regulator. In reality we will never get the -ENODEV error, as current
behavior flow does not predict it, because:
If the device tree or board file does not define suitable regulators for
the component, it will be substituted by a dummy regulator, or, if
regulators are disabled altogether, by stubs.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Suggested-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Crt Mori <cmo@melexis.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
drivers/iio/pressure/ms5611_core.c