Commit a600f458 authored by Abel Moyo's avatar Abel Moyo Committed by Greg Kroah-Hartman

Staging: gdm724x: gdm_usb: added error checking in do_tx()

Added error checking for alloc_tx_struct in do_tx()
Signed-off-by: default avatarAbel Moyo <abelmoyo.ab@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 37d963fb
...@@ -682,6 +682,10 @@ static void do_tx(struct work_struct *work) ...@@ -682,6 +682,10 @@ static void do_tx(struct work_struct *work)
} }
t = alloc_tx_struct(TX_BUF_SIZE); t = alloc_tx_struct(TX_BUF_SIZE);
if (t == NULL) {
spin_unlock_irqrestore(&tx->lock, flags);
return;
}
t->callback = NULL; t->callback = NULL;
t->tx = tx; t->tx = tx;
t->is_sdu = 1; t->is_sdu = 1;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment