[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20240829030739.1899011-1-liyuesong@vivo.com>
Date: Thu, 29 Aug 2024 11:07:39 +0800
From: Yuesong Li <liyuesong@...o.com>
To: elder@...nel.org,
davem@...emloft.net,
edumazet@...gle.com,
kuba@...nel.org,
pabeni@...hat.com,
horms@...nel.org,
lihongbo22@...wei.com
Cc: netdev@...r.kernel.org,
linux-kernel@...r.kernel.org,
opensource.kernel@...o.com,
Yuesong Li <liyuesong@...o.com>
Subject: [PATCH net-next v2] net: ipa: make use of dev_err_cast_probe()
Using dev_err_cast_probe() to simplify the code.
Signed-off-by: Yuesong Li <liyuesong@...o.com>
Signed-off-by: Hongbo Li <lihongbo22@...wei.com>
---
v2: https://lore.kernel.org/all/20240828160728.GR1368797@kernel.org/
- fix patch name
- drop the {} and fix the alignment
---
drivers/net/ipa/ipa_power.c | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/drivers/net/ipa/ipa_power.c b/drivers/net/ipa/ipa_power.c
index 65fd14da0f86..3c239c3545e5 100644
--- a/drivers/net/ipa/ipa_power.c
+++ b/drivers/net/ipa/ipa_power.c
@@ -242,11 +242,9 @@ 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) {
--
2.34.1
Powered by blists - more mailing lists