aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hid/hid-core.c
diff options
context:
space:
mode:
authorJiri Kosina <jkosina@suse.cz>2021-06-30 09:03:51 +0200
committerJiri Kosina <jkosina@suse.cz>2021-06-30 09:03:51 +0200
commitfd73788ce6a580f2bd353e0f364d31b6c16dcd12 (patch)
treedbeecdd8155a9c1c6be3d85739d3740243907c2e /drivers/hid/hid-core.c
parentMerge branch 'for-5.14/amd-sfh' into for-linus (diff)
parentHID: input: Add support for Programmable Buttons (diff)
downloadlinux-dev-fd73788ce6a580f2bd353e0f364d31b6c16dcd12.tar.xz
linux-dev-fd73788ce6a580f2bd353e0f364d31b6c16dcd12.zip
Merge branch 'for-5.14/core' into for-linus
- device unbinding locking fix from Dmitry Torokhov - support for programmable buttons (mapping to KEY_MACRO# event codes) from Thomas Weißschuh - various other small fixes and code style improvements
Diffstat (limited to 'drivers/hid/hid-core.c')
-rw-r--r--drivers/hid/hid-core.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c
index 0de2788b9814..7db332139f7d 100644
--- a/drivers/hid/hid-core.c
+++ b/drivers/hid/hid-core.c
@@ -2306,12 +2306,8 @@ static int hid_device_remove(struct device *dev)
{
struct hid_device *hdev = to_hid_device(dev);
struct hid_driver *hdrv;
- int ret = 0;
- if (down_interruptible(&hdev->driver_input_lock)) {
- ret = -EINTR;
- goto end;
- }
+ down(&hdev->driver_input_lock);
hdev->io_started = false;
hdrv = hdev->driver;
@@ -2326,8 +2322,8 @@ static int hid_device_remove(struct device *dev)
if (!hdev->io_started)
up(&hdev->driver_input_lock);
-end:
- return ret;
+
+ return 0;
}
static ssize_t modalias_show(struct device *dev, struct device_attribute *a,