diff options
author | Yang Yingliang <yangyingliang@huawei.com> | 2022-09-13 05:19:56 +0200 |
---|---|---|
committer | Stephen Boyd <sboyd@kernel.org> | 2022-10-18 01:08:17 +0200 |
commit | e104c74427a67158b59d5a7da9b00362e7f5fe53 (patch) | |
tree | 788955c2646682d8b6e1a91f22f2bbdfddaf1c29 /drivers | |
parent | clk: bulk: Use dev_err_probe() helper in __clk_bulk_get() (diff) | |
download | linux-e104c74427a67158b59d5a7da9b00362e7f5fe53.tar.xz linux-e104c74427a67158b59d5a7da9b00362e7f5fe53.zip |
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>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/clk/keystone/syscon-clk.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/drivers/clk/keystone/syscon-clk.c b/drivers/clk/keystone/syscon-clk.c index 19198325b909..5d7cc83682da 100644 --- a/drivers/clk/keystone/syscon-clk.c +++ b/drivers/clk/keystone/syscon-clk.c @@ -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++) |