Skip to content

Commit ab4fdc7

Browse files
Yang Yingliangvireshk
authored andcommitted
cpufreq: imx6q: Switch to use dev_err_probe() helper
In the probe path, dev_err() can be replaced with dev_err_probe() which will check if error code is -EPROBE_DEFER and prints the error name. It also sets the defer probe reason which can be checked later through debugfs. It's more simple in error path. Signed-off-by: Yang Yingliang <[email protected]> Signed-off-by: Viresh Kumar <[email protected]>
1 parent 2a808b9 commit ab4fdc7

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

drivers/cpufreq/imx6q-cpufreq.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -396,9 +396,7 @@ static int imx6q_cpufreq_probe(struct platform_device *pdev)
396396
ret = imx6q_opp_check_speed_grading(cpu_dev);
397397
}
398398
if (ret) {
399-
if (ret != -EPROBE_DEFER)
400-
dev_err(cpu_dev, "failed to read ocotp: %d\n",
401-
ret);
399+
dev_err_probe(cpu_dev, ret, "failed to read ocotp\n");
402400
goto out_free_opp;
403401
}
404402

0 commit comments

Comments
 (0)