regulator: mt6315: Fix checking return value of devm_regmap_init_spmi_ext
devm_regmap_init_spmi_ext() returns ERR_PTR() on error. Signed-off-by: Axel Lin <axel.lin@ingics.com> Link: https://lore.kernel.org/r/20210615132934.3453965-1-axel.lin@ingics.com Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
8c485bedfb
commit
70d654ea3d
|
@ -223,8 +223,8 @@ static int mt6315_regulator_probe(struct spmi_device *pdev)
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
regmap = devm_regmap_init_spmi_ext(pdev, &mt6315_regmap_config);
|
regmap = devm_regmap_init_spmi_ext(pdev, &mt6315_regmap_config);
|
||||||
if (!regmap)
|
if (IS_ERR(regmap))
|
||||||
return -ENODEV;
|
return PTR_ERR(regmap);
|
||||||
|
|
||||||
chip = devm_kzalloc(dev, sizeof(struct mt6315_chip), GFP_KERNEL);
|
chip = devm_kzalloc(dev, sizeof(struct mt6315_chip), GFP_KERNEL);
|
||||||
if (!chip)
|
if (!chip)
|
||||||
|
|
Loading…
Reference in New Issue