Skip to content

Commit 5fb2864

Browse files
ahalaneyvireshk
authored andcommitted
OPP: Properly propagate error along when failing to get icc_path
fa155f4 ("OPP: Use dev_err_probe() when failing to get icc_path") failed to actually use the error it was trying to log: smatch warnings: drivers/opp/of.c:516 dev_pm_opp_of_find_icc_paths() warn: passing zero to 'dev_err_probe' Make sure to use the right error and pass it along. Fixes: fa155f4 ("OPP: Use dev_err_probe() when failing to get icc_path") Reported-by: kernel test robot <lkp@intel.com> Reported-by: Dan Carpenter <dan.carpenter@linaro.org> Closes: https://lore.kernel.org/r/202306262008.guNLgjt6-lkp@intel.com/ Signed-off-by: Andrew Halaney <ahalaney@redhat.com> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
1 parent fa155f4 commit 5fb2864

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/opp/of.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -513,7 +513,7 @@ int dev_pm_opp_of_find_icc_paths(struct device *dev,
513513
for (i = 0; i < num_paths; i++) {
514514
paths[i] = of_icc_get_by_index(dev, i);
515515
if (IS_ERR(paths[i])) {
516-
ret = dev_err_probe(dev, ret, "%s: Unable to get path%d\n", __func__, i);
516+
ret = dev_err_probe(dev, PTR_ERR(paths[i]), "%s: Unable to get path%d\n", __func__, i);
517517
goto err;
518518
}
519519
}

0 commit comments

Comments
 (0)