Skip to content

Commit 5fe5f17

Browse files
fschrempfbroonie
authored andcommitted
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>
1 parent fbc102f commit 5fe5f17

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/regulator/pca9450-regulator.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -814,7 +814,7 @@ static int pca9450_i2c_probe(struct i2c_client *i2c,
814814

815815
if (IS_ERR(pca9450->sd_vsel_gpio)) {
816816
dev_err(&i2c->dev, "Failed to get SD_VSEL GPIO\n");
817-
return ret;
817+
return PTR_ERR(pca9450->sd_vsel_gpio);
818818
}
819819

820820
dev_info(&i2c->dev, "%s probed.\n",

0 commit comments

Comments
 (0)