]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
iio: adc: at91-sama5d2: Move claim of direct mode up a level and use guard()
authorJonathan Cameron <Jonathan.Cameron@huawei.com>
Mon, 17 Feb 2025 14:16:21 +0000 (14:16 +0000)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Tue, 4 Mar 2025 13:17:50 +0000 (13:17 +0000)
commitb3179f59c104484896516fddb119116e02fa287d
tree8c5aa3ac549956f763e8eb5e3dfa3b621b1e17d2
parent6eedf172d964be30364c3d8ac30751a6ce4815d8
iio: adc: at91-sama5d2: Move claim of direct mode up a level and use guard()

Move iio_device_claim_direct_mode() up one layer in the call stack,
and use guard() for scope based unlocking to simplify error handling
by allowing direct returns.

Reviewed-by: Claudiu Beznea <claudiu.beznea@tuxon.dev>
Link: https://patch.msgid.link/20250217141630.897334-22-jic23@kernel.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/adc/at91-sama5d2_adc.c