* [PATCH] ehci: omap: fix kernel panic with rmmod
@ 2010-03-18 11:28 Ajay Kumar Gupta
[not found] ` <1268911715-10279-1-git-send-email-ajay.gupta-l0cyMroinI0@public.gmane.org>
0 siblings, 1 reply; 2+ messages in thread
From: Ajay Kumar Gupta @ 2010-03-18 11:28 UTC (permalink / raw)
To: linux-usb; +Cc: linux-omap, Ajay Kumar Gupta
Sets the regulator values to NULL if they are not defined. This
is required to fix the kernel panic in exit path when EHCI module
is removed on the platforms where EHCI regulator are not set.
Signed-off-by: Ajay Kumar Gupta <ajay.gupta@ti.com>
---
drivers/usb/host/ehci-omap.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/usb/host/ehci-omap.c b/drivers/usb/host/ehci-omap.c
index f0282d6..c45ee0b 100644
--- a/drivers/usb/host/ehci-omap.c
+++ b/drivers/usb/host/ehci-omap.c
@@ -628,11 +628,13 @@ static int ehci_hcd_omap_probe(struct platform_device *pdev)
}
snprintf(supply, sizeof(supply), "hsusb%d", i);
omap->regulator[i] = regulator_get(omap->dev, supply);
- if (IS_ERR(omap->regulator[i]))
+ if (IS_ERR(omap->regulator[i])) {
+ omap->regulator[i] = NULL;
dev_dbg(&pdev->dev,
"failed to get ehci port%d regulator\n", i);
- else
+ } else {
regulator_enable(omap->regulator[i]);
+ }
}
ret = omap_start_ehc(omap, hcd);
--
1.6.2.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-03-24 7:56 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-03-18 11:28 [PATCH] ehci: omap: fix kernel panic with rmmod Ajay Kumar Gupta
[not found] ` <1268911715-10279-1-git-send-email-ajay.gupta-l0cyMroinI0@public.gmane.org>
2010-03-24 7:56 ` Felipe Balbi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox