[PATCH v3 0/2] iio: light: gp2ap020a00f: fix return type and simplify locking

Ethan Tidmore posted 2 patches 2 months ago
drivers/iio/light/gp2ap020a00f.c | 77 ++++++++++++--------------------
1 file changed, 29 insertions(+), 48 deletions(-)
[PATCH v3 0/2] iio: light: gp2ap020a00f: fix return type and simplify locking
Posted by Ethan Tidmore 2 months ago
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