Message ID | 20240828121551.3696520-1-lihongbo22@huawei.com (mailing list archive) |
---|---|
State | Accepted |
Commit | a41de3b12ec17dbaba443d7aa7cb481dc21aea28 |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | [net-next] net: ipa: make use of dev_err_cast_probe() | expand |
Hello: This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <kuba@kernel.org>: On Wed, 28 Aug 2024 20:15:51 +0800 you wrote: > Using dev_err_cast_probe() to simplify the code. > > Signed-off-by: Hongbo Li <lihongbo22@huawei.com> > --- > drivers/net/ipa/ipa_power.c | 7 ++----- > 1 file changed, 2 insertions(+), 5 deletions(-) Here is the summary with links: - [net-next] net: ipa: make use of dev_err_cast_probe() https://git.kernel.org/netdev/net-next/c/a41de3b12ec1 You are awesome, thank you!
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) {
Using dev_err_cast_probe() to simplify the code. Signed-off-by: Hongbo Li <lihongbo22@huawei.com> --- drivers/net/ipa/ipa_power.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-)