[PATCH v2 3/4] soc: imx: imx8m-blk-ctrl: Scan subnodes and bind drivers to them

Marek Vasut marex at denx.de
Sun Feb 19 21:31:46 PST 2023


On 2/20/23 05:34, Liu Ying wrote:
[...]
>> @@ -310,6 +312,13 @@ static int imx8m_blk_ctrl_probe(struct platform_device *pdev)
>>   
>>   	dev_set_drvdata(dev, bc);
>>   
>> +	for_each_child_of_node(dev->of_node, np) {
>> +		child = of_platform_device_create(np, NULL, dev);
>> +		if (child)
>> +			continue;
> 
> We usually check and handle abnormal cases. So, better to check
> '!child" and warn in the 'if' clause. Anyway, the logic looks ok. So,
> kinda
> 
> Reviewed-by: Liu Ying <victor.liu at nxp.com>

The current approach reduces indentation, so I'll leave it as is.

Thanks



More information about the linux-arm-kernel mailing list