mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-11 04:18:39 +08:00
pmdomain: mediatek: make use of dev_err_cast_probe()
Using dev_err_cast_probe() to simplify the code. Signed-off-by: Hongbo Li <lihongbo22@huawei.com> Reviewed-by: Matthias Brugger <matthias.bgg@gmail.com> Link: https://lore.kernel.org/r/20240828121230.3696315-1-lihongbo22@huawei.com Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
This commit is contained in:
parent
1a2e369aa2
commit
391a2e64d7
@ -398,12 +398,10 @@ generic_pm_domain *scpsys_add_one_domain(struct scpsys *scpsys, struct device_no
|
||||
scpsys->dev->of_node = node;
|
||||
pd->supply = devm_regulator_get(scpsys->dev, "domain");
|
||||
scpsys->dev->of_node = root_node;
|
||||
if (IS_ERR(pd->supply)) {
|
||||
dev_err_probe(scpsys->dev, PTR_ERR(pd->supply),
|
||||
if (IS_ERR(pd->supply))
|
||||
return dev_err_cast_probe(scpsys->dev, pd->supply,
|
||||
"%pOF: failed to get power supply.\n",
|
||||
node);
|
||||
return ERR_CAST(pd->supply);
|
||||
}
|
||||
}
|
||||
|
||||
pd->infracfg = syscon_regmap_lookup_by_phandle_optional(node, "mediatek,infracfg");
|
||||
|
Loading…
Reference in New Issue
Block a user