All of lore.kernel.org
 help / color / mirror / Atom feed
* [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

* Re: [PATCH] ehci: omap: fix kernel panic with rmmod
       [not found] ` <1268911715-10279-1-git-send-email-ajay.gupta-l0cyMroinI0@public.gmane.org>
@ 2010-03-24  7:56   ` Felipe Balbi
  0 siblings, 0 replies; 2+ messages in thread
From: Felipe Balbi @ 2010-03-24  7:56 UTC (permalink / raw)
  To: ext Ajay Kumar Gupta
  Cc: linux-usb-u79uwXL29TY76Z2rM5mHXA, linux-omap-u79uwXL29TY76Z2rM5mHXA

On Thu, Mar 18, 2010 at 12:28:35PM +0100, ext Ajay Kumar Gupta wrote:
>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-l0cyMroinI0@public.gmane.org>

applied, thanks

-- 
balbi
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.