Skip to content

Commit

Permalink
OPP: Use dev_err_probe() when failing to get icc_path
Browse files Browse the repository at this point in the history
This, in tandem with dynamic debug, can print useful information about
-EPROBE_DEFFER like below, and keeps similar behavior for other errors:

    [   16.561072] cpu cpu0: error -EPROBE_DEFER: dev_pm_opp_of_find_icc_paths: Unable to get path0
    [   16.575777] platform 18591000.cpufreq: deferred probe pending

Signed-off-by: Andrew Halaney <ahalaney@redhat.com>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
  • Loading branch information
Andrew Halaney authored and Viresh Kumar committed Jun 26, 2023
1 parent 7c41cdc commit fa155f4
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions drivers/opp/of.c
Original file line number Diff line number Diff line change
Expand Up @@ -513,11 +513,7 @@ int dev_pm_opp_of_find_icc_paths(struct device *dev,
for (i = 0; i < num_paths; i++) {
paths[i] = of_icc_get_by_index(dev, i);
if (IS_ERR(paths[i])) {
ret = PTR_ERR(paths[i]);
if (ret != -EPROBE_DEFER) {
dev_err(dev, "%s: Unable to get path%d: %d\n",
__func__, i, ret);
}
ret = dev_err_probe(dev, ret, "%s: Unable to get path%d\n", __func__, i);
goto err;
}
}
Expand Down

0 comments on commit fa155f4

Please sign in to comment.