mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/
synced 2026-11-08 18:57:22 +00:00
iio: gyro: adxrs290: Use guard(mutex) in lieu of manual lock+unlock
Use guard(mutex)() to automatically release the lock on scope exit, simplifying the error handling path and removing the need for explicit unlock and goto-based cleanup. Signed-off-by: Guilherme Dias <guilhermeabreu200105@usp.br> Co-developed-by: João Paulo Menezes Linaris <jplinaris@usp.br> Signed-off-by: João Paulo Menezes Linaris <jplinaris@usp.br> Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com> Reviewed-by: Maxwell Doose <m32285159@gmail.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
This commit is contained in:
parent
c49965ae6b
commit
ccf300c36b
1 changed files with 31 additions and 44 deletions
Loading…
Add table
Add a link
Reference in a new issue