Skip to content

Commit 02bcba0

Browse files
tititiou36broonie
authored andcommitted
regulator: Handle deferred clk
devm_clk_get() can return -EPROBE_DEFER. So it is better to return the error code from devm_clk_get(), instead of a hard coded -ENOENT. This gives more opportunities to successfully probe the driver. Fixes: 8959e53 ("regulator: fixed: add possibility to enable by clock") Signed-off-by: Christophe JAILLET <[email protected]> Link: https://lore.kernel.org/r/18459fae3d017a66313699c7c8456b28158b2dd0.1679819354.git.christophe.jaillet@wanadoo.fr Signed-off-by: Mark Brown <[email protected]>
1 parent eeac8ed commit 02bcba0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/regulator/fixed.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ static int reg_fixed_voltage_probe(struct platform_device *pdev)
215215
drvdata->enable_clock = devm_clk_get(dev, NULL);
216216
if (IS_ERR(drvdata->enable_clock)) {
217217
dev_err(dev, "Can't get enable-clock from devicetree\n");
218-
return -ENOENT;
218+
return PTR_ERR(drvdata->enable_clock);
219219
}
220220
} else if (drvtype && drvtype->has_performance_state) {
221221
drvdata->desc.ops = &fixed_voltage_domain_ops;

0 commit comments

Comments
 (0)