Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

uwb: fix uwb_dev_unlock() missed at an error path in uwb_rc_cmd_async()

There is the only path in uwb_rc_cmd_async() where rc->uwb_dev is left unlocked.

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

Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Alexey Khoroshilov and committed by
Greg Kroah-Hartman
ffa5c41c d7e14b37

+1
+1
drivers/uwb/reset.c
··· 97 97 neh = uwb_rc_neh_add(rc, cmd, expected_type, expected_event, cb, arg); 98 98 if (IS_ERR(neh)) { 99 99 result = PTR_ERR(neh); 100 + uwb_dev_unlock(&rc->uwb_dev); 100 101 goto out; 101 102 } 102 103