clk: keystone: syscon-clk: Use dev_err_probe() helper

dev_err() can be replace with dev_err_probe() which will check if error
code is -EPROBE_DEFER.

Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Link: https://lore.kernel.org/r/20220913031956.984475-1-yangyingliang@huawei.com
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
This commit is contained in:
Yang Yingliang 2022-09-13 11:19:56 +08:00 committed by Stephen Boyd
parent 4c6b2abf07
commit e104c74427
1 changed files with 3 additions and 6 deletions

View File

@ -102,12 +102,9 @@ static int ti_syscon_gate_clk_probe(struct platform_device *pdev)
return -EINVAL;
regmap = syscon_node_to_regmap(dev->of_node);
if (IS_ERR(regmap)) {
if (PTR_ERR(regmap) == -EPROBE_DEFER)
return -EPROBE_DEFER;
dev_err(dev, "failed to find parent regmap\n");
return PTR_ERR(regmap);
}
if (IS_ERR(regmap))
return dev_err_probe(dev, PTR_ERR(regmap),
"failed to find parent regmap\n");
num_clks = 0;
for (p = data; p->name; p++)