Re: [PATCH v2 1/2] usb: chipidea: ci_hdrc_imx: Propagate errors from optional IRQ lookup
Bui Duc Phuc <[email protected]>
| Newsgroups | dev.linux.lists.imx,dev.linux.lists.sashiko-reviews |
|---|---|
| Message-ID | <CAABR9nEnA7Ur_A2KycNV_26V5HmujuFG9PZeTQBPSLesLQRcsg@mail.gmail.com> |
Hi Frank, Thanks for pointing this out. > > [Severity: High] > > Does this jump skip the necessary cleanup for the USB PHY? > > > > If usb_phy_init() succeeded earlier in ci_hdrc_imx_probe() and > > platform_get_irq_optional() returns an error like -EPROBE_DEFER, > > jumping directly to err_clk bypasses the phy_shutdown label: > > > > ci_hdrc_imx_probe() > > ... > > phy_shutdown: > > if (data->override_phy_control) > > usb_phy_shutdown(data->phy); > > err_clk: > > > > Can this leak the initialized PHY state, regulators, or clocks, especially > > since -EPROBE_DEFER can be hit multiple times? Should this be goto > > phy_shutdown instead? > > > Please check this, make sense. > I agree that this makes sense. I'll make the change and send v3. Best regards, Phuc