aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/gdm724x
diff options
context:
space:
mode:
authorAbel Moyo <abelmoyo.ab@gmail.com>2014-09-18 21:49:10 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-09-19 16:56:46 -0700
commita600f4589fdbb51a0ad885408f996ec0f1f90be9 (patch)
tree5f297d21a888971a6f2e66294cba088a5c2a5a0d /drivers/staging/gdm724x
parentstaging: gdm724x: Fix missing blank line warning. (diff)
downloadlinux-dev-a600f4589fdbb51a0ad885408f996ec0f1f90be9.tar.xz
linux-dev-a600f4589fdbb51a0ad885408f996ec0f1f90be9.zip
Staging: gdm724x: gdm_usb: added error checking in do_tx()
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>
Diffstat (limited to 'drivers/staging/gdm724x')
-rw-r--r--drivers/staging/gdm724x/gdm_usb.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/staging/gdm724x/gdm_usb.c b/drivers/staging/gdm724x/gdm_usb.c
index 483185bb4ecf..5d44490ba77c 100644
--- 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;