diff options
author | Frieder Schrempf <frieder.schrempf@kontron.de> | 2021-02-22 16:08:04 +0100 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2021-03-10 12:22:23 +0000 |
commit | 5fe5f17dc59e508cae1ec2a898a0801f54aeeaae (patch) | |
tree | cbe04b90a0ec2a1b87d51a37b08fd73093dec3ce /drivers/regulator/pca9450-regulator.c | |
parent | fbc102fb4ccfaebf1f9c178bb78cc76108e954e7 (diff) |
regulator: pca9450: Fix return value when failing to get sd-vsel GPIO
This fixes the return value of pca9450_i2c_probe() to use the correct
error code when getting the sd-vsel GPIO fails.
Signed-off-by: Frieder Schrempf <frieder.schrempf@kontron.de>
Link: https://lore.kernel.org/r/20210222150809.208942-1-frieder.schrempf@kontron.de
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/regulator/pca9450-regulator.c')
-rw-r--r-- | drivers/regulator/pca9450-regulator.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/regulator/pca9450-regulator.c b/drivers/regulator/pca9450-regulator.c index 833d398c6aa2..89b806be399f 100644 --- a/drivers/regulator/pca9450-regulator.c +++ b/drivers/regulator/pca9450-regulator.c @@ -814,7 +814,7 @@ static int pca9450_i2c_probe(struct i2c_client *i2c, if (IS_ERR(pca9450->sd_vsel_gpio)) { dev_err(&i2c->dev, "Failed to get SD_VSEL GPIO\n"); - return ret; + return PTR_ERR(pca9450->sd_vsel_gpio); } dev_info(&i2c->dev, "%s probed.\n", |