diff options
author | Rafael J. Wysocki | 2022-07-15 13:54:14 +0200 |
---|---|---|
committer | Rafael J. Wysocki | 2022-07-15 13:54:14 +0200 |
commit | 5a5adb1528e59e8a4b23ffa7dda4849b61e97cf8 (patch) | |
tree | 66907bb948a72b8e9d021c45e4b5dc6bb51c063e /drivers/cpufreq | |
parent | 32346491ddf24599decca06190ebca03ff9de7f8 (diff) | |
parent | d2394860b45c3c1484e4b0a5d09909a1e3f6569e (diff) |
Merge tag 'cpufreq-arm-fixes-5.19-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm
Pull a cpufreq ARM fix for 5.19-rc7 from Viresh Kumar:
- mediatek: Handle sram regulator probe deferral
* tag 'cpufreq-arm-fixes-5.19-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm:
cpufreq: mediatek: Handle sram regulator probe deferral
Diffstat (limited to 'drivers/cpufreq')
-rw-r--r-- | drivers/cpufreq/mediatek-cpufreq.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/cpufreq/mediatek-cpufreq.c b/drivers/cpufreq/mediatek-cpufreq.c index 37a1eb20f5ba..76f6b3884e6b 100644 --- a/drivers/cpufreq/mediatek-cpufreq.c +++ b/drivers/cpufreq/mediatek-cpufreq.c @@ -439,9 +439,13 @@ static int mtk_cpu_dvfs_info_init(struct mtk_cpu_dvfs_info *info, int cpu) /* Both presence and absence of sram regulator are valid cases. */ info->sram_reg = regulator_get_optional(cpu_dev, "sram"); - if (IS_ERR(info->sram_reg)) + if (IS_ERR(info->sram_reg)) { + ret = PTR_ERR(info->sram_reg); + if (ret == -EPROBE_DEFER) + goto out_free_resources; + info->sram_reg = NULL; - else { + } else { ret = regulator_enable(info->sram_reg); if (ret) { dev_warn(cpu_dev, "cpu%d: failed to enable vsram\n", cpu); |