[PATCH] nvmem: imx-ocotp: Use helper function devm_clk_get_enabled()

Krzysztof Kozlowski krzk at kernel.org
Mon Jun 23 23:52:45 PDT 2025


On 24/06/2025 08:50, Krzysztof Kozlowski wrote:
> On 24/06/2025 05:23, Huan Tang wrote:
>> Use devm_clk_get_enabled() helper to simplify code.
>>
>> Signed-off-by: Huan Tang <tanghuan at vivo.com>
>> ---
>>  drivers/nvmem/imx-ocotp.c | 3 +--
>>  1 file changed, 1 insertion(+), 2 deletions(-)
>>
>> diff --git a/drivers/nvmem/imx-ocotp.c b/drivers/nvmem/imx-ocotp.c
>> index 79dd4fda0329..ce5970ba4033 100644
>> --- a/drivers/nvmem/imx-ocotp.c
>> +++ b/drivers/nvmem/imx-ocotp.c
>> @@ -605,7 +605,7 @@ static int imx_ocotp_probe(struct platform_device *pdev)
>>  	if (IS_ERR(priv->base))
>>  		return PTR_ERR(priv->base);
>>  
>> -	priv->clk = devm_clk_get(dev, NULL);
>> +	priv->clk = devm_clk_get_enabled(dev, NULL);
> 
> This is just confusing or even wrong. You do not understand the code,
> just blindly do some changes pointed by scripting.
> 
> NAK.


I spotted error path further, so let's correct above: it is not only
confusing, but you introduce actual bugs!

No for another round of terrible vivo.com scripted bugs.

Best regards,
Krzysztof



More information about the linux-arm-kernel mailing list