summaryrefslogtreecommitdiffstats
path: root/drivers/net/ipa
diff options
context:
space:
mode:
authorHongbo Li <lihongbo22@huawei.com>2024-08-28 14:15:51 +0200
committerJakub Kicinski <kuba@kernel.org>2024-08-29 20:41:05 +0200
commita41de3b12ec17dbaba443d7aa7cb481dc21aea28 (patch)
tree91044404362427f41f22f19a42d057b8600acf1b /drivers/net/ipa
parentMerge branch 'net-vertexcom-mse102x-minor-clean-ups' (diff)
downloadlinux-a41de3b12ec17dbaba443d7aa7cb481dc21aea28.tar.xz
linux-a41de3b12ec17dbaba443d7aa7cb481dc21aea28.zip
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>
Diffstat (limited to 'drivers/net/ipa')
-rw-r--r--drivers/net/ipa/ipa_power.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/net/ipa/ipa_power.c b/drivers/net/ipa/ipa_power.c
index 65fd14da0f86..c572da9e9bc4 100644
--- a/drivers/net/ipa/ipa_power.c
+++ b/drivers/net/ipa/ipa_power.c
@@ -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) {