1 From 86e4cb35f2260374df4139c2352afe7fe247cb60 Mon Sep 17 00:00:00 2001
2 From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
3 Date: Mon, 6 Aug 2012 18:06:53 -0700
4 Subject: [PATCH] usb: host: ehci-platform: BUG_ON() to WARN_ON() on probe
6 Commit 86e4cb35f2260374df4139c2352afe7fe247cb60 upstream.
8 usb_ehci_pdata is certainly required in ehci-platform driver.
9 This patch avoids using BUG_ON() from driver,
10 and return from probe with WARN_ON() if pdata was NULL.
12 Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
13 Acked-by: Alan Stern <stern@rowland.harvard.edu>
14 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
16 drivers/usb/host/ehci-platform.c | 6 +++++-
17 1 file changed, 5 insertions(+), 1 deletion(-)
19 --- a/drivers/usb/host/ehci-platform.c
20 +++ b/drivers/usb/host/ehci-platform.c
21 @@ -82,10 +82,14 @@ static int __devinit ehci_platform_probe
24 struct resource *res_mem;
25 + struct usb_ehci_pdata *pdata = dev->dev.platform_data;
29 - BUG_ON(!dev->dev.platform_data);