Thread (20 messages) 20 messages, 4 authors, 2024-08-25

Re: [PATCH 7/7] memory: pl353-smc: simplify with devm_clk_get_enabled()

From: Krzysztof Kozlowski <hidden>
Date: 2024-08-25 08:13:25
Also in: linux-omap, lkml

On 23/08/2024 13:56, Jonathan Cameron wrote:
With change below this becomes unconditional as we'll have already
returned in the loop for the good path.

Might as well use dev_err_probe() here as well to save a few lines.
quoted
-		err = -ENODEV;
 		dev_err(&adev->dev, "no matching children\n");
-		goto disable_mem_clk;
+		return -ENODEV;
 	}
 
 	of_platform_device_create(child, NULL, &adev->dev);
 	of_node_put(child);
An additional cleanup looks sensible here.

Push this last bit into the loop and use 

for_each_available_child_of_node_scoped()

Assuming you don't already have a patch doing that :)
Yes, this could be simplified, thanks for the hint.

Best regards,
Krzysztof

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help