char: xillybus: fix a refcount leak in cleanup_dev()
authorHangyu Hua <hbh25y@gmail.com>
Wed, 6 Apr 2022 07:57:03 +0000 (15:57 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 14 Jun 2022 16:36:21 +0000 (18:36 +0200)
commitbc8fceda3b89006e8a7dda8a097d36045d044c25
treec5aecad39fcd5994e55f7a29a90397fe467fae72
parentfeb0fb39695b9f627c3f15a39fea8ee090e2f8fc
char: xillybus: fix a refcount leak in cleanup_dev()

[ Upstream commit b67d19662fdee275c479d21853bc1239600a798f ]

usb_get_dev is called in xillyusb_probe. So it is better to call
usb_put_dev before xdev is released.

Acked-by: Eli Billauer <eli.billauer@gmail.com>
Signed-off-by: Hangyu Hua <hbh25y@gmail.com>
Link: https://lore.kernel.org/r/20220406075703.23464-1-hbh25y@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/char/xillybus/xillyusb.c