diff options
author | 2021-02-22 16:08:04 +0100 | |
---|---|---|
committer | 2021-02-24 13:24:28 +0000 | |
commit | ef4848a6532ba0b241d3b6cad70378ff2c5615ca (patch) | |
tree | dc8bcc5d29a4a0385e972da5017d05bd95206e65 | |
parent | regulator: mt6315: Return REGULATOR_MODE_INVALID for invalid mode (diff) | |
download | wireguard-linux-ef4848a6532ba0b241d3b6cad70378ff2c5615ca.tar.xz wireguard-linux-ef4848a6532ba0b241d3b6cad70378ff2c5615ca.zip |
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 '')
-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", |