OSDN Git Service
(root)
/
android-x86
/
kernel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
usb/chipidea: fix oops on memory allocation failure
[android-x86/kernel.git]
/
drivers
/
usb
/
chipidea
/
host.c
diff --git
a/drivers/usb/chipidea/host.c
b/drivers/usb/chipidea/host.c
index
6f96795
..
64d7a6d
100644
(file)
--- a/
drivers/usb/chipidea/host.c
+++ b/
drivers/usb/chipidea/host.c
@@
-100,8
+100,10
@@
static void host_stop(struct ci_hdrc *ci)
{
struct usb_hcd *hcd = ci->hcd;
- usb_remove_hcd(hcd);
- usb_put_hcd(hcd);
+ if (hcd) {
+ usb_remove_hcd(hcd);
+ usb_put_hcd(hcd);
+ }
if (ci->platdata->reg_vbus)
regulator_disable(ci->platdata->reg_vbus);
}