]> git.baikalelectronics.ru Git - kernel.git/commit
regulator: fix null pointer check on regmap
authorColin Ian King <colin.king@canonical.com>
Thu, 2 Jul 2020 11:56:59 +0000 (12:56 +0100)
committerMark Brown <broonie@kernel.org>
Thu, 2 Jul 2020 15:45:45 +0000 (16:45 +0100)
commitb47429ea9c5cbb638fd629a4ef328efd5637180b
tree9c65801da5fd4cefba74b5e99f2273ff3e72e547
parentb50e1b621b794e10be7fb34478d4026789706c02
regulator: fix null pointer check on regmap

The null pointer check on regmap that checks for a dev_get_regmap failure
is currently returning -ENOENT if the regmap succeeded. Fix this by adding
in the missing ! operator.

Fixes: 4860158b45b4 ("regulator: Add support for QCOM PMIC VBUS booster")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Addresses-Coverity: ("Dereference after null check")
Link: https://lore.kernel.org/r/20200702115659.38208-1-colin.king@canonical.com
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/regulator/qcom_usb_vbus-regulator.c