]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
platform/chrome: cros_ec_ishtp: Fix a double-unlock issue
authorQiushi Wu <wu000273@umn.edu>
Sat, 23 May 2020 03:16:08 +0000 (22:16 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 21 Aug 2020 11:07:32 +0000 (13:07 +0200)
commit538576a05cf8d0da16ea2bf194e997891adf82ef
tree25580b77d80f5e147c9e675091fd0b6b412761e9
parent76629a6d86a7956279d38eb3686027d3a89eaabf
platform/chrome: cros_ec_ishtp: Fix a double-unlock issue

[ Upstream commit aaa3cbbac326c95308e315f1ab964a3369c4d07d ]

In function cros_ec_ishtp_probe(), "up_write" is already called
before function "cros_ec_dev_init". But "up_write" will be called
again after the calling of the function "cros_ec_dev_init" failed.
Thus add a call of the function “down_write” in this if branch
for the completion of the exception handling.

Fixes: 26a14267aff2 ("platform/chrome: Add ChromeOS EC ISHTP driver")
Signed-off-by: Qiushi Wu <wu000273@umn.edu>
Tested-by: Mathew King <mathewk@chromium.org>
Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/platform/chrome/cros_ec_ishtp.c