lkml.org 
[lkml]   [2023]   [Jul]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 08/10] Input: nomadik-ske-keypad - Convert to use devm_* api
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

\
 
 \ /
  Last update: 2023-07-11 02:44    [W:0.960 / U:0.012 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site