can: gs_usb: gs_can_open(): prevent memory leak
authorNavid Emamdoost <navid.emamdoost@gmail.com>
Fri, 20 Sep 2019 02:44:38 +0000 (21:44 -0500)
committerMarc Kleine-Budde <mkl@pengutronix.de>
Mon, 4 Nov 2019 20:47:20 +0000 (21:47 +0100)
commitfb5be6a7b4863ecc44963bb80ca614584b6c7817
treebda3705945340f42c209771ad76652ba9e8e965e
parentdb9ee384f6f71f7c5296ce85b7c1a2a2527e7c72
can: gs_usb: gs_can_open(): prevent memory leak

In gs_can_open() if usb_submit_urb() fails the allocated urb should be
released.

Fixes: d08e973a77d1 ("can: gs_usb: Added support for the GS_USB CAN devices")
Cc: linux-stable <stable@vger.kernel.org>
Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
drivers/net/can/usb/gs_usb.c