Re: [PATCH] usb: gadget: renesas_usbf: Handle devm_pm_runtime_enable() errors

From: Andy Shevchenko

Date: Wed Nov 26 2025 - 07:47:07 EST


On Mon, Nov 24, 2025 at 02:15:14PM +0100, Geert Uytterhoeven wrote:
> On Mon, 24 Nov 2025 at 03:24, Haotian Zhang <vulab@xxxxxxxxxxx> wrote:

> Thanks for your patch!

...

> > - devm_pm_runtime_enable(&pdev->dev);
> > + ret = devm_pm_runtime_enable(&pdev->dev);
> > + if (ret)
> > + return ret;
>
> Perhaps insert a blank line here?
>
> > ret = pm_runtime_resume_and_get(&pdev->dev);
> > if (ret < 0)
> > return ret;

FWIW, if not fixed yet, this driver from this line towards the end of
the function leaks the PM runtime reference count.

> Reviewed-by: Geert Uytterhoeven <geert+renesas@xxxxxxxxx>

--
With Best Regards,
Andy Shevchenko