diff options
-rw-r--r-- | drivers/regulator/mt6315-regulator.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/regulator/mt6315-regulator.c b/drivers/regulator/mt6315-regulator.c index 8c5d72869c2b..ebb68d3b5390 100644 --- a/drivers/regulator/mt6315-regulator.c +++ b/drivers/regulator/mt6315-regulator.c @@ -223,8 +223,8 @@ static int mt6315_regulator_probe(struct spmi_device *pdev) int i; regmap = devm_regmap_init_spmi_ext(pdev, &mt6315_regmap_config); - if (!regmap) - return -ENODEV; + if (IS_ERR(regmap)) + return PTR_ERR(regmap); chip = devm_kzalloc(dev, sizeof(struct mt6315_chip), GFP_KERNEL); if (!chip) |