staging: gdm724x: fix leak at failure path in init_usb()
authorAlexey Khoroshilov <khoroshilov@ispras.ru>
Thu, 10 Jul 2014 23:31:41 +0000 (19:31 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 12 Jul 2014 00:33:49 +0000 (17:33 -0700)
commit22505b258be0c112b71ef5a794579965c540188f
treed502b50315ff35067996811585e07f08502747fc
parent4f4756fc81a22e9f6bc600b1ed6c10eb2a5162f0
staging: gdm724x: fix leak at failure path in init_usb()

If an allocation in init_usb() failed, it returns without
deallocation of already allocated resources.

The patch fix it and replaces GFP_ATOMIC by GFP_KERNEL in
alloc_tx_sdu_struct() and alloc_rx_struct() as long as
they are called from probe only.

Found by Linux Driver Verification project (linuxtesting.org).

Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/gdm724x/gdm_usb.c