Commit a41de3b1 authored by Hongbo Li's avatar Hongbo Li Committed by Jakub Kicinski

net: ipa: make use of dev_err_cast_probe()

Using dev_err_cast_probe() to simplify the code.
Signed-off-by: default avatarHongbo Li <lihongbo22@huawei.com>
Link: https://patch.msgid.link/20240828121551.3696520-1-lihongbo22@huawei.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent daca6afc
......@@ -242,11 +242,8 @@ ipa_power_init(struct device *dev, const struct ipa_power_data *data)
int ret;
clk = clk_get(dev, "core");
if (IS_ERR(clk)) {
dev_err_probe(dev, PTR_ERR(clk), "error getting core clock\n");
return ERR_CAST(clk);
}
if (IS_ERR(clk))
return dev_err_cast_probe(dev, clk, "error getting core clock\n");
ret = clk_set_rate(clk, data->core_clock_rate);
if (ret) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment