Skip to content

Commit ae76fd3

Browse files
konradybcioandersson
authored andcommitted
firmware: qcom_scm: Always return devm_clk_get_optional errors
If devm_clk_get_optional throws an error, something is really wrong. It may be a probe deferral, or it may be a problem with the clock provider. Regardless of what it may be, it should definitely not be ignored. Stop doing that. Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org> Link: https://lore.kernel.org/r/20230623-topic-scm_cleanup-v2-2-9db8c583138d@linaro.org Signed-off-by: Bjorn Andersson <andersson@kernel.org>
1 parent 5130464 commit ae76fd3

1 file changed

Lines changed: 6 additions & 12 deletions

File tree

drivers/firmware/qcom_scm.c

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1419,22 +1419,16 @@ static int qcom_scm_probe(struct platform_device *pdev)
14191419
"failed to acquire interconnect path\n");
14201420

14211421
scm->core_clk = devm_clk_get_optional(&pdev->dev, "core");
1422-
if (IS_ERR(scm->core_clk)) {
1423-
if (PTR_ERR(scm->core_clk) == -EPROBE_DEFER)
1424-
return PTR_ERR(scm->core_clk);
1425-
}
1422+
if (IS_ERR(scm->core_clk))
1423+
return PTR_ERR(scm->core_clk);
14261424

14271425
scm->iface_clk = devm_clk_get_optional(&pdev->dev, "iface");
1428-
if (IS_ERR(scm->iface_clk)) {
1429-
if (PTR_ERR(scm->iface_clk) == -EPROBE_DEFER)
1430-
return PTR_ERR(scm->iface_clk);
1431-
}
1426+
if (IS_ERR(scm->iface_clk))
1427+
return PTR_ERR(scm->iface_clk);
14321428

14331429
scm->bus_clk = devm_clk_get_optional(&pdev->dev, "bus");
1434-
if (IS_ERR(scm->bus_clk)) {
1435-
if (PTR_ERR(scm->bus_clk) == -EPROBE_DEFER)
1436-
return PTR_ERR(scm->bus_clk);
1437-
}
1430+
if (IS_ERR(scm->bus_clk))
1431+
return PTR_ERR(scm->bus_clk);
14381432

14391433
scm->reset.ops = &qcom_scm_pas_reset_ops;
14401434
scm->reset.nr_resets = 1;

0 commit comments

Comments
 (0)