]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
Input: fix open count when closing inhibited device
authorDmitry Torokhov <dmitry.torokhov@gmail.com>
Fri, 5 May 2023 18:16:07 +0000 (11:16 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 14 Jun 2023 09:16:53 +0000 (11:16 +0200)
commitab68e1f294527994b4019b7449ee920358b09e21
treed96bdebf09f63486309463fcb8fe1d60fab0f9ef
parent3c078a31648db3ec9409ea91b810973be11d1b3c
Input: fix open count when closing inhibited device

commit 978134c4b192ed04ecf699be3e1b4d23b5d20457 upstream.

Because the kernel increments device's open count in input_open_device()
even if device is inhibited, the counter should always be decremented in
input_close_device() to keep it balanced.

Fixes: a181616487db ("Input: Add "inhibited" property")
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Link: https://lore.kernel.org/r/ZFFz0xAdPNSL3PT7@google.com
Cc: stable@vger.kernel.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/input/input.c