[PATCH] soc: imx8m: fix clock reference leak in imx8m_soc_prepare()
Felix Gu
ustc.gu at gmail.com
Tue Jun 30 06:58:00 PDT 2026
Hi Peng,
On Mon, Jun 29, 2026 at 3:21 PM Peng Fan (OSS) <peng.fan at oss.nxp.com> wrote:
> > platform_device *pdev, const char *ocotp_com
> >
> > ret = clk_prepare_enable(drvdata->clk);
> > if (ret)
> > - goto err_clk;
> > + goto put_clk;
> >
> > return 0;
> >
> > +put_clk:
> > + clk_put(drvdata->clk);
> > err_clk:
>
> It should be safe to directly put "clk_put" here, no
> need extra label.
Passing an error_ptr to clk_put() could invoke WARN_ON_ONCE.
Best regards
Felix
>
> Regards
> Peng.
>
> > iounmap(drvdata->ocotp_base);
> > return ret;
> >
More information about the linux-arm-kernel
mailing list