Commit 5e3e2297 authored by Mario Limonciello's avatar Mario Limonciello Committed by Darren Hart (VMware)

platform/x86: wmi: release mutex on module acquistion failure

This failure mode should have also released the mutex.
Signed-off-by: default avatarMario Limonciello <mario.limonciello@dell.com>
Signed-off-by: default avatarDarren Hart (VMware) <dvhart@infradead.org>
parent 54d11736
...@@ -868,8 +868,10 @@ static long wmi_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) ...@@ -868,8 +868,10 @@ static long wmi_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
/* let the driver do any filtering and do the call */ /* let the driver do any filtering and do the call */
wdriver = container_of(wblock->dev.dev.driver, wdriver = container_of(wblock->dev.dev.driver,
struct wmi_driver, driver); struct wmi_driver, driver);
if (!try_module_get(wdriver->driver.owner)) if (!try_module_get(wdriver->driver.owner)) {
return -EBUSY; ret = -EBUSY;
goto out_ioctl;
}
ret = wdriver->filter_callback(&wblock->dev, cmd, buf); ret = wdriver->filter_callback(&wblock->dev, cmd, buf);
module_put(wdriver->driver.owner); module_put(wdriver->driver.owner);
if (ret) if (ret)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment