]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
iio: gyro: adxrs290: Use guard(mutex) in lieu of manual lock+unlock
authorGuilherme Dias <guilhermeabreu200105@usp.br>
Mon, 4 May 2026 19:04:25 +0000 (16:04 -0300)
committerJonathan Cameron <jic23@kernel.org>
Sun, 31 May 2026 09:59:34 +0000 (10:59 +0100)
commitccf300c36bd6c79eeef4f4122fd2e58acfa46dbb
tree8cd7d48b474723bd649a30395d386f34273d60b8
parentc49965ae6b0c1a6362737fbce1e06617882f51fc
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>
drivers/iio/gyro/adxrs290.c