]> www.infradead.org Git - users/jedix/linux-maple.git/commit
Input: regulator-haptic - use guard notation when acquiring mutex
authorDmitry Torokhov <dmitry.torokhov@gmail.com>
Wed, 4 Sep 2024 20:55:07 +0000 (13:55 -0700)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Thu, 3 Oct 2024 16:10:38 +0000 (09:10 -0700)
commit2dc387620b85f2061fdcab172efdd9856999e987
tree4fea06be88150bfbf6bf46cd78cd3769afb9cca7
parent5bd3ade12109b276337ce85b950e09e09043e748
Input: regulator-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/ZtjJKxQRRzJE0aWZ@google.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
drivers/input/misc/regulator-haptic.c