* [PATCH] drivers/input/mouse:modify mutex_lock before mutex_unlock
@ 2021-03-18 3:44 ChunyouTang
0 siblings, 0 replies; only message in thread
From: ChunyouTang @ 2021-03-18 3:44 UTC (permalink / raw)
To: dmitry.torokhov, wangxiongfeng2; +Cc: linux-input, linux-kernel, tangchunyou
From: tangchunyou <tangchunyou@yulong.com>
mutex_lock should before mutex_unlock
Signed-off-by: tangchunyou <tangchunyou@yulong.com>
---
drivers/input/mouse/psmouse-base.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/input/mouse/psmouse-base.c b/drivers/input/mouse/psmouse-base.c
index 0b4a303..d01798c 100644
--- a/drivers/input/mouse/psmouse-base.c
+++ b/drivers/input/mouse/psmouse-base.c
@@ -1923,9 +1923,9 @@ static ssize_t psmouse_attr_set_protocol(struct psmouse *psmouse, void *data, co
return -EIO;
}
- mutex_unlock(&psmouse_mutex);
- serio_unregister_child_port(serio);
mutex_lock(&psmouse_mutex);
+ serio_unregister_child_port(serio);
+ mutex_unlock(&psmouse_mutex);
if (serio->drv != &psmouse_drv) {
input_free_device(new_dev);
--
1.9.1
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2021-03-18 8:03 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-18 3:44 [PATCH] drivers/input/mouse:modify mutex_lock before mutex_unlock ChunyouTang
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).