[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZKyliRefKiualqO1@google.com>
Date: Mon, 10 Jul 2023 17:42:49 -0700
From: Dmitry Torokhov <dmitry.torokhov@...il.com>
To: Yangtao Li <frank.li@...o.com>
Cc: linux-input@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [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
Powered by blists - more mailing lists