[PATCH] memory: atmel-ebi: unwind SMC clock on probe failures

Krzysztof Kozlowski krzk at kernel.org
Tue Jun 30 10:26:32 PDT 2026


On 16/06/2026 17:17, Pengpeng Hou wrote:
>  	reg_cells += val;
> @@ -603,11 +605,23 @@ static int atmel_ebi_probe(struct platform_device *pdev)
>  
>  			ret = atmel_ebi_dev_disable(ebi, child);
>  			if (ret)
> -				return ret;
> +				goto err_disable_smc_clk;
>  		}
>  	}
>  
> -	return of_platform_populate(np, NULL, NULL, dev);
> +	ret = of_platform_populate(np, NULL, NULL, dev);
> +	if (ret) {
> +		of_platform_depopulate(dev);

Why do we need to depopulate when populate returned with an error?

Best regards,
Krzysztof



More information about the linux-arm-kernel mailing list