projects
/
GitHub
/
MotorolaMobilityLLC
/
kernel-slsi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a93917d
)
usb: host: sl811-hcd: check kzalloc() result
author
Kulikov Vasiliy
<segooon@gmail.com>
Fri, 16 Jul 2010 16:15:06 +0000
(20:15 +0400)
committer
Greg Kroah-Hartman
<gregkh@suse.de>
Tue, 10 Aug 2010 21:35:42 +0000
(14:35 -0700)
If kzalloc() fails exit with -ENOMEM.
Signed-off-by: Kulikov Vasiliy <segooon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/host/sl811-hcd.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/usb/host/sl811-hcd.c
b/drivers/usb/host/sl811-hcd.c
index bcf9f0e809dedbd194d34cd6e2a39639a1ff94ea..990f06b89eaadd55225d04169efbfdc09cf988ed 100644
(file)
--- a/
drivers/usb/host/sl811-hcd.c
+++ b/
drivers/usb/host/sl811-hcd.c
@@
-813,8
+813,11
@@
static int sl811h_urb_enqueue(
#endif
/* avoid all allocations within spinlocks */
- if (!hep->hcpriv)
+ if (!hep->hcpriv)
{
ep = kzalloc(sizeof *ep, mem_flags);
+ if (ep == NULL)
+ return -ENOMEM;
+ }
spin_lock_irqsave(&sl811->lock, flags);