Skip to content

iio: light: iqs621-als: use lock guards and prefer early error handling

Pedro Barletta Gennari linux-iio 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest2 patches 2 repliesIn review
  2. v21 patch 3 repliesSuperseded
  3. v11 patch 1 replySuperseded

Changes in v3 from the cover letter

- Remove unnecessary { }
- Remove unnecessary ret initialization
- Flip 'if (!ret)' to 'if (ret)'

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2iio: light: iqs621-als: use lock guardsdrivers/iio/light/iqs621-als.c+31 -620 replies
2/2iio: light: iqs621-als: prefer early error handling over if (!ret)drivers/iio/light/iqs621-als.c+15 -90 replies

Reviews trailers per patch

None of the 2 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchAndy Shevchenko
SeriesR-b
1/2
2/2

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v3 thread

Cover letter [PATCH v3 0/2] iio: light: iqs621-als: use lock guards and prefer early error handling

Use guard(mutex)() for handling mutex lock instead of manually locking and unlocking the mutex and flip 'if (!ret)' to 'if (ret)' to handle errors early in drivers/iio/light/iqs621-als.c

Patch 2 depends on patch 1

---
v3:
- Remove unnecessary { }
- Remove unnecessary ret initialization
- Flip 'if (!ret)' to 'if (ret)'
v2:
- Keep include list ordered
- Remove redundant 'else'
- Remove unnecessary variable 'ret'
---

Pedro Barletta Gennari (2):
iio: light: iqs621-als: use lock guards
iio: light: iqs621-als: prefer early error handling over if (!ret)

 drivers/iio/light/iqs621-als.c | 111 +++++++++++++--------------------
 1 file changed, 43 insertions(+), 68 deletions(-)
Signature · 1 line
2.51.0