Input: max8997_haptic - use guard notation when acquiring mutex
authorDmitry Torokhov <dmitry.torokhov@gmail.com>
Wed, 4 Sep 2024 04:48:33 +0000 (21:48 -0700)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Thu, 3 Oct 2024 16:10:37 +0000 (09:10 -0700)
commit844111df52dc2d1f2da6c80d4b7e219d7b6e16f9
tree7039cf23e6b4168fa28b90bdf5e1e977272df606
parent452e0adff26188fb13bfc862f665bdc684ce64fc
Input: max8997_haptic - 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/20240904044834.1048468-1-dmitry.torokhov@gmail.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
drivers/input/misc/max8997_haptic.c