diff options
author | Sean Anderson <sean.anderson@seco.com> | 2021-08-10 01:38:12 +0300 |
---|---|---|
committer | Stephen Boyd <sboyd@kernel.org> | 2021-08-29 09:46:21 +0300 |
commit | 2ef162548a53085499c08485228daa968d66dc5a (patch) | |
tree | 09d71677e94aa94d37343bee9b02083c50e505c8 /drivers/clk/clk-versaclock5.c | |
parent | 275e4e2dc0411508506acb591a45daf01d22f8eb (diff) | |
download | linux-2ef162548a53085499c08485228daa968d66dc5a.tar.xz |
clk: vc5: Use dev_err_probe
Convert uses of dev_err (+ return) to dev_err_probe.
Signed-off-by: Sean Anderson <sean.anderson@seco.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Luca Ceresoli <luca@lucaceresoli.net>
Link: https://lore.kernel.org/r/20210809223813.3766204-2-sean.anderson@seco.com
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
Diffstat (limited to 'drivers/clk/clk-versaclock5.c')
-rw-r--r-- | drivers/clk/clk-versaclock5.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/drivers/clk/clk-versaclock5.c b/drivers/clk/clk-versaclock5.c index 3c737742c2a9..a430128a4573 100644 --- a/drivers/clk/clk-versaclock5.c +++ b/drivers/clk/clk-versaclock5.c @@ -930,10 +930,9 @@ static int vc5_probe(struct i2c_client *client, const struct i2c_device_id *id) return -EPROBE_DEFER; vc5->regmap = devm_regmap_init_i2c(client, &vc5_regmap_config); - if (IS_ERR(vc5->regmap)) { - dev_err(&client->dev, "failed to allocate register map\n"); - return PTR_ERR(vc5->regmap); - } + if (IS_ERR(vc5->regmap)) + return dev_err_probe(&client->dev, PTR_ERR(vc5->regmap), + "failed to allocate register map\n"); /* Register clock input mux */ memset(&init, 0, sizeof(init)); @@ -957,10 +956,9 @@ static int vc5_probe(struct i2c_client *client, const struct i2c_device_id *id) __clk_get_name(vc5->pin_clkin); } - if (!init.num_parents) { - dev_err(&client->dev, "no input clock specified!\n"); - return -EINVAL; - } + if (!init.num_parents) + return dev_err_probe(&client->dev, -EINVAL, + "no input clock specified!\n"); /* Configure Optional Loading Capacitance for external XTAL */ if (!(vc5->chip_info->flags & VC5_HAS_INTERNAL_XTAL)) { @@ -1099,14 +1097,16 @@ static int vc5_probe(struct i2c_client *client, const struct i2c_device_id *id) ret = of_clk_add_hw_provider(client->dev.of_node, vc5_of_clk_get, vc5); if (ret) { - dev_err(&client->dev, "unable to add clk provider\n"); + dev_err_probe(&client->dev, ret, + "unable to add clk provider\n"); goto err_clk; } return 0; err_clk_register: - dev_err(&client->dev, "unable to register %s\n", init.name); + dev_err_probe(&client->dev, ret, + "unable to register %s\n", init.name); kfree(init.name); /* clock framework made a copy of the name */ err_clk: if (vc5->chip_info->flags & VC5_HAS_INTERNAL_XTAL) |