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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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





[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux