Skip to content

Commit b44f12a

Browse files
jhovoldGeorgi Djakov
authored andcommitted
interconnect: exynos: handle node name allocation failure
Add the missing error handling in case node name allocation ever fails. Fixes: 2f95b9d ("interconnect: Add generic interconnect driver for Exynos SoCs") Signed-off-by: Johan Hovold <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Georgi Djakov <[email protected]>
1 parent 886a94f commit b44f12a

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

drivers/interconnect/samsung/exynos.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,11 @@ static int exynos_generic_icc_probe(struct platform_device *pdev)
134134
priv->node = icc_node;
135135
icc_node->name = devm_kasprintf(&pdev->dev, GFP_KERNEL, "%pOFn",
136136
bus_dev->of_node);
137+
if (!icc_node->name) {
138+
icc_node_destroy(pdev->id);
139+
return -ENOMEM;
140+
}
141+
137142
if (of_property_read_u32(bus_dev->of_node, "samsung,data-clock-ratio",
138143
&priv->bus_clk_ratio))
139144
priv->bus_clk_ratio = EXYNOS_ICC_DEFAULT_BUS_CLK_RATIO;

0 commit comments

Comments
 (0)