linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH AUTOSEL 5.12 01/52] HID: do not use down_interruptible() when unbinding devices
@ 2021-07-05 15:28 Sasha Levin
  2021-07-05 15:28 ` [PATCH AUTOSEL 5.12 02/52] EDAC/ti: Add missing MODULE_DEVICE_TABLE Sasha Levin
                   ` (35 more replies)
  0 siblings, 36 replies; 37+ messages in thread
From: Sasha Levin @ 2021-07-05 15:28 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Dmitry Torokhov, Jiri Kosina, Sasha Levin, linux-input

From: Dmitry Torokhov <dmitry.torokhov@gmail.com>

[ Upstream commit f2145f8dc566c4f3b5a8deb58dcd12bed4e20194 ]

Action of unbinding driver from a device is not cancellable and should not
fail, and driver core does not pay attention to the result of "remove"
method, therefore using down_interruptible() in hid_device_remove() does
not make sense.

Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/hid/hid-core.c | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)

diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c
index 0f69f35f2957..5550c943f985 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,
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 37+ messages in thread

end of thread, other threads:[~2021-07-05 15:31 UTC | newest]

Thread overview: 37+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-05 15:28 [PATCH AUTOSEL 5.12 01/52] HID: do not use down_interruptible() when unbinding devices Sasha Levin
2021-07-05 15:28 ` [PATCH AUTOSEL 5.12 02/52] EDAC/ti: Add missing MODULE_DEVICE_TABLE Sasha Levin
2021-07-05 15:28 ` [PATCH AUTOSEL 5.12 03/52] ACPI: PM: s2idle: Add missing LPS0 functions for AMD Sasha Levin
2021-07-05 15:28 ` [PATCH AUTOSEL 5.12 04/52] ACPI: processor idle: Fix up C-state latency if not ordered Sasha Levin
2021-07-05 15:28 ` [PATCH AUTOSEL 5.12 05/52] hv_utils: Fix passing zero to 'PTR_ERR' warning Sasha Levin
2021-07-05 15:28 ` [PATCH AUTOSEL 5.12 06/52] lib: vsprintf: Fix handling of number field widths in vsscanf Sasha Levin
2021-07-05 15:28 ` [PATCH AUTOSEL 5.12 07/52] Input: goodix - platform/x86: touchscreen_dmi - Move upside down quirks to touchscreen_dmi.c Sasha Levin
2021-07-05 15:28 ` [PATCH AUTOSEL 5.12 08/52] platform/x86: touchscreen_dmi: Add an extra entry for the upside down Goodix touchscreen on Teclast X89 tablets Sasha Levin
2021-07-05 15:28 ` [PATCH AUTOSEL 5.12 09/52] platform/x86: touchscreen_dmi: Add info for the Goodix GT912 panel of TM800A550L tablets Sasha Levin
2021-07-05 15:28 ` [PATCH AUTOSEL 5.12 10/52] ACPI: EC: Make more Asus laptops use ECDT _GPE Sasha Levin
2021-07-05 15:28 ` [PATCH AUTOSEL 5.12 11/52] block_dump: remove block_dump feature in mark_inode_dirty() Sasha Levin
2021-07-05 15:28 ` [PATCH AUTOSEL 5.12 12/52] blk-mq: grab rq->refcount before calling ->fn in blk_mq_tagset_busy_iter Sasha Levin
2021-07-05 15:28 ` [PATCH AUTOSEL 5.12 13/52] blk-mq: clear stale request in tags->rq[] before freeing one request pool Sasha Levin
2021-07-05 15:28 ` [PATCH AUTOSEL 5.12 14/52] fs: dlm: reconnect if socket error report occurs Sasha Levin
2021-07-05 15:28 ` [PATCH AUTOSEL 5.12 15/52] fs: dlm: cancel work sync othercon Sasha Levin
2021-07-05 15:28 ` [PATCH AUTOSEL 5.12 16/52] random32: Fix implicit truncation warning in prandom_seed_state() Sasha Levin
2021-07-05 15:28 ` [PATCH AUTOSEL 5.12 17/52] open: don't silently ignore unknown O-flags in openat2() Sasha Levin
2021-07-05 15:28 ` [PATCH AUTOSEL 5.12 18/52] drivers: hv: Fix missing error code in vmbus_connect() Sasha Levin
2021-07-05 15:28 ` [PATCH AUTOSEL 5.12 19/52] fs: dlm: fix lowcomms_start error case Sasha Levin
2021-07-05 15:28 ` [PATCH AUTOSEL 5.12 20/52] fs: dlm: fix memory leak when fenced Sasha Levin
2021-07-05 15:28 ` [PATCH AUTOSEL 5.12 21/52] ACPICA: Fix memory leak caused by _CID repair function Sasha Levin
2021-07-05 15:28 ` [PATCH AUTOSEL 5.12 22/52] ACPI: bus: Call kobject_put() in acpi_init() error path Sasha Levin
2021-07-05 15:28 ` [PATCH AUTOSEL 5.12 23/52] ACPI: resources: Add checks for ACPI IRQ override Sasha Levin
2021-07-05 15:28 ` [PATCH AUTOSEL 5.12 24/52] HID: hid-input: add Surface Go battery quirk Sasha Levin
2021-07-05 15:28 ` [PATCH AUTOSEL 5.12 25/52] HID: sony: fix freeze when inserting ghlive ps3/wii dongles Sasha Levin
2021-07-05 15:28 ` [PATCH AUTOSEL 5.12 26/52] block: fix race between adding/removing rq qos and normal IO Sasha Levin
2021-07-05 15:28 ` [PATCH AUTOSEL 5.12 27/52] platform/x86: asus-nb-wmi: Revert "Drop duplicate DMI quirk structures" Sasha Levin
2021-07-05 15:28 ` [PATCH AUTOSEL 5.12 28/52] platform/x86: asus-nb-wmi: Revert "add support for ASUS ROG Zephyrus G14 and G15" Sasha Levin
2021-07-05 15:28 ` [PATCH AUTOSEL 5.12 29/52] platform/x86: toshiba_acpi: Fix missing error code in toshiba_acpi_setup_keyboard() Sasha Levin
2021-07-05 15:28 ` [PATCH AUTOSEL 5.12 30/52] nvme-pci: fix var. type for increasing cq_head Sasha Levin
2021-07-05 15:28 ` [PATCH AUTOSEL 5.12 31/52] nvmet-fc: do not check for invalid target port in nvmet_fc_handle_fcp_rqst() Sasha Levin
2021-07-05 15:28 ` [PATCH AUTOSEL 5.12 32/52] EDAC/Intel: Do not load EDAC driver when running as a guest Sasha Levin
2021-07-05 15:28 ` [PATCH AUTOSEL 5.12 33/52] tools/power/x86/intel-speed-select: Fix uncore memory frequency display Sasha Levin
2021-07-05 15:28 ` [PATCH AUTOSEL 5.12 34/52] PCI: hv: Add check for hyperv_initialized in init_hv_pci_drv() Sasha Levin
2021-07-05 15:28 ` [PATCH AUTOSEL 5.12 35/52] cifs: improve fallocate emulation Sasha Levin
2021-07-05 15:28 ` [PATCH AUTOSEL 5.12 36/52] cifs: fix check of dfs interlinks Sasha Levin
2021-07-05 15:28 ` [PATCH AUTOSEL 5.12 37/52] smb3: fix uninitialized value for port in witness protocol move Sasha Levin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).