Re: [PATCH] USB: ohci-spear: check clk_prepare_enable in probe

From: Greg KH

Date: Mon Oct 26 2026 - 10:33:21 EST


On Mon, Oct 26, 2026 at 09:40:19PM +0800, Tang Bin wrote:
> spear_ohci_hcd_drv_probe() ignored the return of
> clk_prepare_enable(sohci_p->clk). On failure usb_add_hcd() runs unclocked
> and the error path clk_disable_unprepare() would unbalance the count. Check
> the return and bail to err_put_hcd on failure.
>
> Fixes: 1cc6ac59ffaa ("USB: OHCI: make ohci-spear a separate driver")
> Signed-off-by: Tang Bin <tangbin@xxxxxxxxxxxxxxxxxxxx>

How was this found and tested?

And no cc: stable?

thanks,

greg k-h