net: ipa: make use of dev_err_cast_probe()
Using dev_err_cast_probe() to simplify the code. Signed-off-by: Hongbo Li <lihongbo22@huawei.com> Link: https://patch.msgid.link/20240828121551.3696520-1-lihongbo22@huawei.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
parent
daca6afc19
commit
a41de3b12e
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user