[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CACRpkdYc0Pae0AnfqYh89FR6a8BxwfLgN1sTaR-Frx0gaZZB4Q@mail.gmail.com>
Date: Mon, 8 May 2023 15:34:46 +0200
From: Linus Walleij <linus.walleij@...aro.org>
To: Ziliang Liao <saraday@...t.edu.cn>
Cc: Andy Gross <agross@...nel.org>,
Bjorn Andersson <andersson@...nel.org>,
Konrad Dybcio <konrad.dybcio@...aro.org>,
hust-os-kernel-patches@...glegroups.com,
Dongliang Mu <dzm91@...t.edu.cn>,
linux-arm-msm@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/2] bus: qcom-ebi2: use prefix devm for clock resource
allocation functions
On Sun, Apr 30, 2023 at 2:53 PM Ziliang Liao <saraday@...t.edu.cn> wrote:
> Smatch reports:
>
> drivers/bus/qcom-ebi2.c:387 qcom_ebi2_probe() warn: 'ebi2clk' from
> clk_prepare_enable() not released on lines: 358.
>
> drivers/bus/qcom-ebi2.c:387 qcom_ebi2_probe() warn: 'ebi2xclk' from
> clk_prepare_enabled() not released on lines: 358.
>
> The clk_disable_unprepare() is only used to explicitly release resources
> when the qcom_ebi2_probe() fails, and when executed correctly, it may
> cause resource leakage due to unknown release time.
>
> Replace devm_clk_get() and clk_prepare_enable() with
> devm_clk_get_enabled() to automatically manage the allocated resources.
>
> Fixes: 335a12754808 ("bus: qcom: add EBI2 driver")
> Signed-off-by: Ziliang Liao <saraday@...t.edu.cn>
> Reviewed-by: Dongliang Mu <dzm91@...t.edu.cn>
Looks good:
Reviewed-by: Linus Walleij <linus.walleij@...aro.org>
I think Bjorn can queue this in the Qualcomm ARM tree.
Yours,
Linus Walleij
Powered by blists - more mailing lists