From: Alexey Khoroshilov Date: Mon, 26 Nov 2012 20:26:46 +0000 (+0400) Subject: uwb: fix uwb_dev_unlock() missed at an error path in uwb_rc_cmd_async() X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=ffa5c41c81503b6f48fddb5d39f18af526ded8d3;p=linux-beck.git 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 Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/uwb/reset.c b/drivers/uwb/reset.c index 703228559e89..8b47c9cdd642 100644 --- a/drivers/uwb/reset.c +++ b/drivers/uwb/reset.c @@ -97,6 +97,7 @@ int uwb_rc_cmd_async(struct uwb_rc *rc, const char *cmd_name, neh = uwb_rc_neh_add(rc, cmd, expected_type, expected_event, cb, arg); if (IS_ERR(neh)) { result = PTR_ERR(neh); + uwb_dev_unlock(&rc->uwb_dev); goto out; }