Skip to contentSkip to conversation

interconnect: exynos: handle node name allocation failure

PATCH New Johan Hovold 1 participant 1 message Jun 23, 2025

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 interconnect: exynos: handle node name allocation failure

Add the missing error handling in case node name allocation ever fails.

Fixes 2f95b9d5cf0b ("interconnect: Add generic interconnect driver for Exynos SoCs")
---
 drivers/interconnect/samsung/exynos.c | 5 +++++
 1 file changed, 5 insertions(+)
drivers/interconnect/samsung/exynos.c +5 -0
index 9e041365d909..8e8f56186a36 100644
@@ -134,6 +134,11 @@ static int exynos_generic_icc_probe(struct platform_device *pdev)
 	priv->node = icc_node;
 	icc_node->name = devm_kasprintf(&pdev->dev, GFP_KERNEL, "%pOFn",
 					bus_dev->of_node);
+	if (!icc_node->name) {
+		icc_node_destroy(pdev->id);
+		return -ENOMEM;
+	}
+
 	if (of_property_read_u32(bus_dev->of_node, "samsung,data-clock-ratio",
 				 &priv->bus_clk_ratio))
 		priv->bus_clk_ratio = EXYNOS_ICC_DEFAULT_BUS_CLK_RATIO;
Signature · 1 line
2.49.0