History

ARM: OMAP: USB: Fixup ehci_hcd_omap_probe error path

A recent commit, [PATCH] Fix OMAP EHCI suspend/resume failure (i693) '354ab856' causes ehci probe to fail on omap3xxx. This exposed bugs in the ehci_hcd_omap_probe error path causing an oops. On the error path, call usb_remove_hcd if usb_add_hcd has been called, and call usb_put_hcd if usb_alloc_hcd has been called. Tested on BB-xM.

Russ Dill committed 14 years ago

Commit 984e9741 parent a46af4e1 file · +5 −1Browse files

Unified · Split

drivers/usb/host/ehci-omap.c+5−1
@@ -347,7 +347,7 @@ static int ehci_hcd_omap_probe(struct platform_device *pdev) · 346 unmodified lines
347347 ret = usb_add_hcd(hcd, irq, IRQF_SHARED);
348348 if (ret) {
349349 dev_err(dev, "failed to add hcd with err %d\n", ret);
350− goto err_add_hcd;
350+ goto err_pm_runtime;
351351 }
352352
353353 /* root ports should always stay powered */
@@ -424,8 +424,12 @@ err_utmi_p1_fck: · 70 unmodified lines
424424 clk_put(utmi_p1_fck);
425425
426426 err_add_hcd:
427+ usb_remove_hcd(hcd);
428+
429+err_pm_runtime:
427430 disable_put_regulator(pdata);
428431 pm_runtime_put_sync(dev);
432+ usb_put_hcd(hcd);
429433
430434 err_io:
431435 iounmap(regs);

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t