Re: [PATCH 08/10] Input: nomadik-ske-keypad - Convert to use devm_* api

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

 



Hi,

On Wed, Jul 05, 2023 at 01:23:44PM +0800, Yangtao Li wrote:
> @@ -305,7 +288,7 @@ static int __init ske_keypad_probe(struct platform_device *pdev)
>  	error = clk_prepare_enable(keypad->pclk);
>  	if (error) {
>  		dev_err(&pdev->dev, "Failed to prepare/enable pclk\n");
> -		goto err_clk;
> +		return error;
>  	}
>  
>  	error = clk_prepare_enable(keypad->clk);

We should not mix managed (devm) and normal resources, because doing so
wrecks the order of resource unwinding. Lucklily we have
devm_clk_get_enabled() now, so I switched the driver to use it and
applied the patch.

Thanks.

-- 
Dmitry



[Index of Archives]     [Linux Media Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux