On Sun, Apr 30, 2023 at 2:53 PM Ziliang Liao <saraday@xxxxxxxxxxx> 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@xxxxxxxxxxx> > Reviewed-by: Dongliang Mu <dzm91@xxxxxxxxxxx> Looks good: Reviewed-by: Linus Walleij <linus.walleij@xxxxxxxxxx> I think Bjorn can queue this in the Qualcomm ARM tree. Yours, Linus Walleij