[PATCH 7/7] memory: pl353-smc: simplify with devm_clk_get_enabled()
Krzysztof Kozlowski
krzysztof.kozlowski at linaro.org
Sun Aug 25 01:13:20 PDT 2024
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.
>
>> - 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
More information about the linux-arm-kernel
mailing list