summaryrefslogtreecommitdiff
path: root/drivers/regulator/slg51000-regulator.c
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2019-09-09 12:56:10 +0300
committerMark Brown <broonie@kernel.org>2019-09-09 12:56:10 +0300
commit7933147e81ba4b813baf725b7beb39cfa6f7bd55 (patch)
tree98fca3071824a8e9bb83c2b8f7fce0f869cc8373 /drivers/regulator/slg51000-regulator.c
parent6cbe29c92311ea6ef67a7eac2bc089357412973b (diff)
parent3829100a63724f6dbf264b2a7f06e7f638ed952d (diff)
downloadlinux-7933147e81ba4b813baf725b7beb39cfa6f7bd55.tar.xz
Merge branch 'regulator-5.3' into regulator-5.4
Diffstat (limited to 'drivers/regulator/slg51000-regulator.c')
-rw-r--r--drivers/regulator/slg51000-regulator.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/regulator/slg51000-regulator.c b/drivers/regulator/slg51000-regulator.c
index 04b732991d69..4d859fef55e6 100644
--- a/drivers/regulator/slg51000-regulator.c
+++ b/drivers/regulator/slg51000-regulator.c
@@ -205,7 +205,7 @@ static int slg51000_of_parse_cb(struct device_node *np,
ena_gpiod = devm_gpiod_get_from_of_node(chip->dev, np,
"enable-gpios", 0,
gflags, "gpio-en-ldo");
- if (ena_gpiod) {
+ if (!IS_ERR(ena_gpiod)) {
config->ena_gpiod = ena_gpiod;
devm_gpiod_unhinge(chip->dev, config->ena_gpiod);
}
@@ -459,7 +459,7 @@ static int slg51000_i2c_probe(struct i2c_client *client,
GPIOD_OUT_HIGH
| GPIOD_FLAGS_BIT_NONEXCLUSIVE,
"slg51000-cs");
- if (cs_gpiod) {
+ if (!IS_ERR(cs_gpiod)) {
dev_info(dev, "Found chip selector property\n");
chip->cs_gpiod = cs_gpiod;
}