[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20240828101445.979343-1-liyuesong@vivo.com>
Date: Wed, 28 Aug 2024 18:14:45 +0800
From: Yuesong Li <liyuesong@...o.com>
To: djakov@...nel.org
Cc: linux-pm@...r.kernel.org,
linux-kernel@...r.kernel.org,
opensource.kernel@...o.com,
Yuesong Li <liyuesong@...o.com>
Subject: [PATCH v1] interconnect: make use of dev_err_cast_probe()
Using dev_err_cast_probe() to simplify the code.
Signed-off-by: Yuesong Li <liyuesong@...o.com>
---
drivers/interconnect/core.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/interconnect/core.c b/drivers/interconnect/core.c
index 7e9b996b47c8..2ec4b6c2f49d 100644
--- a/drivers/interconnect/core.c
+++ b/drivers/interconnect/core.c
@@ -500,16 +500,16 @@ struct icc_path *of_icc_get_by_index(struct device *dev, int idx)
src_data = of_icc_get_from_provider(&src_args);
if (IS_ERR(src_data)) {
- dev_err_probe(dev, PTR_ERR(src_data), "error finding src node\n");
- return ERR_CAST(src_data);
+ return dev_err_cast_probe(dev, src_data,
+ "error finding src node\n");
}
dst_data = of_icc_get_from_provider(&dst_args);
if (IS_ERR(dst_data)) {
- dev_err_probe(dev, PTR_ERR(dst_data), "error finding dst node\n");
kfree(src_data);
- return ERR_CAST(dst_data);
+ return dev_err_cast_probe(dev, dst_data,
+ "error finding dst node\n");
}
mutex_lock(&icc_lock);
--
2.34.1
Powered by blists - more mailing lists