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