staging: ft1000: fix memory leak on error path in ft1000_probe()
authorAlexey Khoroshilov <khoroshilov@ispras.ru>
Mon, 10 Jun 2013 19:29:16 +0000 (23:29 +0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 12 Jun 2013 00:13:37 +0000 (17:13 -0700)
ft1000dev->tx_urb and ft1000dev->rx_urb are not deallocated
if something goes wrong in ft1000_probe(). Also there is no
check for success of urb allocation. The patch fixes the both issues.

By the way, there is no sense in GFP_ATOMIC for urb allocation here,
so it is changed to GFP_KERNEL.

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>

No differences found