usb: yurex: Fix inconsistent locking bug in yurex_read()
authorHarshit Mogalapalli <harshit.m.mogalapalli@oracle.com>
Tue, 19 Dec 2023 06:36:35 +0000 (22:36 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 2 Jan 2024 13:41:51 +0000 (14:41 +0100)
commite7d3b9f28654dbfce7e09f8028210489adaf6a33
tree1293e2b4927720cf96d7161e58c1caec720c3d77
parent4c3ea81aa8e11400f24e5541bf46c2cadb4202e9
usb: yurex: Fix inconsistent locking bug in yurex_read()

Unlock before returning on the error path.

Fixes: 86b20af11e84 ("usb: yurex: Replace snprintf() with the safer scnprintf() variant")
Reported-by: Dan Carpenter <error27@gmail.com>
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/r/202312170252.3udgrIcP-lkp@intel.com/
Signed-off-by: Harshit Mogalapalli <harshit.m.mogalapalli@oracle.com>
Link: https://lore.kernel.org/r/20231219063639.450994-1-harshit.m.mogalapalli@oracle.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/misc/yurex.c