[PATCH v3 0/2] iio: light: gp2ap020a00f: fix return type and simplify locking
From: Ethan Tidmore
Date: Sun Feb 15 2026 - 19:53:48 EST
Patch 1 is a cleanup that simplifies the locking mechanisms using
guard(), as suggested by Jonathan Cameron. This removes the need
for goto error paths, making the subsequent fix cleaner.
Patch 2 changes the return type of the helper function to int and
adds the necessary error checks in the callers.
Ethan Tidmore (2):
iio: light: gp2ap020a00f: simplify locking with guard()
iio: light: gp2ap020a00f: correct return type to int
drivers/iio/light/gp2ap020a00f.c | 77 ++++++++++++--------------------
1 file changed, 29 insertions(+), 48 deletions(-)
--
2.53.0