Input: drv260x - use guard notation when acquiring mutex
authorDmitry Torokhov <dmitry.torokhov@gmail.com>
Wed, 4 Sep 2024 04:42:27 +0000 (21:42 -0700)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Thu, 3 Oct 2024 16:10:36 +0000 (09:10 -0700)
commit0a54609a890e808f9d7ad944a99a25b17153f65c
treee9777262db825c1f0d698eb509d1cf7088b12c91
parent6bbf7efc40f7d43383bac63537a8d4e6253a2e98
Input: drv260x - use guard notation when acquiring mutex

Using guard notation makes the code more compact and error handling
more robust by ensuring that mutexes are released in all code paths
when control leaves critical section.

Reviewed-by: Javier Carrasco <javier.carrasco.cruz@gmail.com>
Link: https://lore.kernel.org/r/20240904044244.1042174-8-dmitry.torokhov@gmail.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
drivers/input/misc/drv260x.c