diff options
author | Chen-Yu Tsai <wenst@chromium.org> | 2022-02-08 13:40:04 +0100 |
---|---|---|
committer | Stephen Boyd <sboyd@kernel.org> | 2022-02-17 21:12:21 +0100 |
commit | 2403d6f1b1dac1b7864cd8b9b4a0f7350c63e770 (patch) | |
tree | 6789661db8f551ca81600bb2854bb7682e8dafd3 /drivers/clk/mediatek/clk-mux.c | |
parent | clk: mediatek: Fix memory leaks on probe (diff) | |
download | linux-2403d6f1b1dac1b7864cd8b9b4a0f7350c63e770.tar.xz linux-2403d6f1b1dac1b7864cd8b9b4a0f7350c63e770.zip |
clk: mediatek: Use %pe to print errors
If %pe is used to print errors, a string representation of the error
would be printed instead of a number as with %ld. Also, all the sites
printing errors are deriving the error code from a pointer. Using %pe
is more straightforward.
Signed-off-by: Chen-Yu Tsai <wenst@chromium.org>
Reviewed-by: Miles Chen <miles.chen@mediatek.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://lore.kernel.org/r/20220208124034.414635-2-wenst@chromium.org
Reviewed-by: Chun-Jie Chen <chun-jie.chen@mediatek.com>
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
Diffstat (limited to 'drivers/clk/mediatek/clk-mux.c')
-rw-r--r-- | drivers/clk/mediatek/clk-mux.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/clk/mediatek/clk-mux.c b/drivers/clk/mediatek/clk-mux.c index 6d3a50eb7d6f..89f23e111d91 100644 --- a/drivers/clk/mediatek/clk-mux.c +++ b/drivers/clk/mediatek/clk-mux.c @@ -175,8 +175,7 @@ int mtk_clk_register_muxes(const struct mtk_mux *muxes, regmap = device_node_to_regmap(node); if (IS_ERR(regmap)) { - pr_err("Cannot find regmap for %pOF: %ld\n", node, - PTR_ERR(regmap)); + pr_err("Cannot find regmap for %pOF: %pe\n", node, regmap); return PTR_ERR(regmap); } @@ -187,8 +186,7 @@ int mtk_clk_register_muxes(const struct mtk_mux *muxes, clk = mtk_clk_register_mux(mux, regmap, lock); if (IS_ERR(clk)) { - pr_err("Failed to register clk %s: %ld\n", - mux->name, PTR_ERR(clk)); + pr_err("Failed to register clk %s: %pe\n", mux->name, clk); continue; } |