OSDN Git Service
(root)
/
uclinux-h8
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
37d963f
)
Staging: gdm724x: gdm_usb: added error checking in do_tx()
author
Abel Moyo
<abelmoyo.ab@gmail.com>
Thu, 18 Sep 2014 19:49:10 +0000
(21:49 +0200)
committer
Greg Kroah-Hartman
<gregkh@linuxfoundation.org>
Fri, 19 Sep 2014 23:56:46 +0000
(16:56 -0700)
Added error checking for alloc_tx_struct in do_tx()
Signed-off-by: Abel Moyo <abelmoyo.ab@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/gdm724x/gdm_usb.c
patch
|
blob
|
history
diff --git
a/drivers/staging/gdm724x/gdm_usb.c
b/drivers/staging/gdm724x/gdm_usb.c
index
483185b
..
5d44490
100644
(file)
--- a/
drivers/staging/gdm724x/gdm_usb.c
+++ b/
drivers/staging/gdm724x/gdm_usb.c
@@
-682,6
+682,10
@@
static void do_tx(struct work_struct *work)
}
t = alloc_tx_struct(TX_BUF_SIZE);
+ if (t == NULL) {
+ spin_unlock_irqrestore(&tx->lock, flags);
+ return;
+ }
t->callback = NULL;
t->tx = tx;
t->is_sdu = 1;