public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] interconnect: Do not create empty devres on missing interconnects
@ 2026-04-16 13:09 Krzysztof Kozlowski
  2026-04-16 16:37 ` Kuan-Wei Chiu
  0 siblings, 1 reply; 2+ messages in thread
From: Krzysztof Kozlowski @ 2026-04-16 13:09 UTC (permalink / raw)
  To: Georgi Djakov, linux-pm, linux-kernel; +Cc: Krzysztof Kozlowski

of_icc_get() returns NULL on valid case - no interconnects - but no
need to create devres for that, because it just wastes memory without
any use/benefits.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
---
 drivers/interconnect/core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/interconnect/core.c b/drivers/interconnect/core.c
index 8569b78a1851..ce572c62f58f 100644
--- a/drivers/interconnect/core.c
+++ b/drivers/interconnect/core.c
@@ -432,7 +432,7 @@ struct icc_path *devm_of_icc_get(struct device *dev, const char *name)
 		return ERR_PTR(-ENOMEM);
 
 	path = of_icc_get(dev, name);
-	if (!IS_ERR(path)) {
+	if (!IS_ERR_OR_NULL(path)) {
 		*ptr = path;
 		devres_add(dev, ptr);
 	} else {
-- 
2.51.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-04-16 16:37 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-16 13:09 [PATCH] interconnect: Do not create empty devres on missing interconnects Krzysztof Kozlowski
2026-04-16 16:37 ` Kuan-Wei Chiu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox