Skip to content

Commit 584dc41

Browse files
krzkstorulf
authored andcommitted
pmdomain: qcom: cpr: Simplify with dev_err_probe()
Use dev_err_probe() to make defer code handling simpler. Signed-off-by: Krzysztof Kozlowski <[email protected]> Reviewed-by: Konrad Dybcio <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Ulf Hansson <[email protected]>
1 parent 13bd778 commit 584dc41

File tree

1 file changed

+2
-3
lines changed
  • drivers/pmdomain/qcom

1 file changed

+2
-3
lines changed

drivers/pmdomain/qcom/cpr.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1464,9 +1464,8 @@ static int cpr_pd_attach_dev(struct generic_pm_domain *domain,
14641464
*/
14651465
drv->cpu_clk = devm_clk_get(dev, NULL);
14661466
if (IS_ERR(drv->cpu_clk)) {
1467-
ret = PTR_ERR(drv->cpu_clk);
1468-
if (ret != -EPROBE_DEFER)
1469-
dev_err(drv->dev, "could not get cpu clk: %d\n", ret);
1467+
ret = dev_err_probe(drv->dev, PTR_ERR(drv->cpu_clk),
1468+
"could not get cpu clk\n");
14701469
goto unlock;
14711470
}
14721471
drv->attached_cpu_dev = dev;

0 commit comments

Comments
 (0)