Input: serio_raw - use guard notation for locks and other resources
authorDmitry Torokhov <dmitry.torokhov@gmail.com>
Thu, 5 Sep 2024 04:17:25 +0000 (21:17 -0700)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Fri, 4 Oct 2024 08:04:14 +0000 (01:04 -0700)
commit5b53a9d40c4f83b44de8da06af9a9c9b3fb14988
tree56bb72dab376f5416f532fd27f893199f24a439e
parent924c5eeb17490136d9ec688b0926bbae27eb0a1f
Input: serio_raw - use guard notation for locks and other resources

Use guard notation when acquiring mutexes and spinlocks, and when
pausing and resuming serio port. Such guard notation makes the code
more compact and error handling more robust by ensuring that locks
are released in all code paths when control leaves critical section.

Link: https://lore.kernel.org/r/20240905041732.2034348-21-dmitry.torokhov@gmail.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
drivers/input/serio/serio_raw.c