HID: thrustmaster: Fix memory leaks in probe
authorEvgeny Novikov <novikov@ispras.ru>
Fri, 30 Jul 2021 16:51:08 +0000 (19:51 +0300)
committerJiri Kosina <jkosina@suse.cz>
Fri, 20 Aug 2021 12:24:56 +0000 (14:24 +0200)
commitd0f1d5ae23803bd82647a337fa508fa8615defc5
treedf83074bb692c02daec60ef74069b98d64f6bb13
parentdf04fbe8680bfe07f3d7487eccff9f768bb02533
HID: thrustmaster: Fix memory leaks in probe

When thrustmaster_probe() handles errors of usb_submit_urb() it does not
free allocated resources and fails. The patch fixes that.

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

Signed-off-by: Evgeny Novikov <novikov@ispras.ru>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
drivers/hid/hid-thrustmaster.c