Skip to content

Commit ab6efe6

Browse files
committed
Merge tag 'pm-5.19-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm
Pull power management fix from Rafael Wysocki "Fix recent regression in the cpufreq mediatek driver related to incorrect handling of regulator_get_optional() return value (AngeloGioacchino Del Regno)" * tag 'pm-5.19-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: cpufreq: mediatek: Handle sram regulator probe deferral
2 parents 16c957f + 5a5adb1 commit ab6efe6

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

drivers/cpufreq/mediatek-cpufreq.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -439,9 +439,13 @@ static int mtk_cpu_dvfs_info_init(struct mtk_cpu_dvfs_info *info, int cpu)
439439

440440
/* Both presence and absence of sram regulator are valid cases. */
441441
info->sram_reg = regulator_get_optional(cpu_dev, "sram");
442-
if (IS_ERR(info->sram_reg))
442+
if (IS_ERR(info->sram_reg)) {
443+
ret = PTR_ERR(info->sram_reg);
444+
if (ret == -EPROBE_DEFER)
445+
goto out_free_resources;
446+
443447
info->sram_reg = NULL;
444-
else {
448+
} else {
445449
ret = regulator_enable(info->sram_reg);
446450
if (ret) {
447451
dev_warn(cpu_dev, "cpu%d: failed to enable vsram\n", cpu);

0 commit comments

Comments
 (0)