HID: sony: Fix a potential memory leak in sony_probe()
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Sun, 3 Sep 2023 16:04:00 +0000 (18:04 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 10 Oct 2023 20:00:39 +0000 (22:00 +0200)
commitf237b17611fa3501f43f12d1cb64323e10fdcb4f
tree39f38582ee827120be3e436da524585d4e432c5c
parent6e3ae2927b432a3b7c8374f14dbc1bd9ebe4372c
HID: sony: Fix a potential memory leak in sony_probe()

[ Upstream commit e1cd4004cde7c9b694bbdd8def0e02288ee58c74 ]

If an error occurs after a successful usb_alloc_urb() call, usb_free_urb()
should be called.

Fixes: fb1a79a6b6e1 ("HID: sony: fix freeze when inserting ghlive ps3/wii dongles")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/hid/hid-sony.c