[PATCH v2 0/3] staging: most: replace BUG_ON() with proper error handling

Olle Lukowski posted 3 patches 3 months, 2 weeks ago
drivers/staging/most/dim2/dim2.c   | 27 +++++++++++++++++++--------
drivers/staging/most/i2c/i2c.c     |  9 ++++++---
drivers/staging/most/video/video.c |  3 ++-
3 files changed, 27 insertions(+), 12 deletions(-)
[PATCH v2 0/3] staging: most: replace BUG_ON() with proper error handling
Posted by Olle Lukowski 3 months, 2 weeks ago
This small series replaces BUG_ON() calls in three staging MOST drivers
with appropriate error handling.

The affected drivers are:

  - drivers/staging/most/i2c/i2c.c
  - drivers/staging/most/dim2/dim2.c
  - drivers/staging/most/video/video.c

All changes are mechanical and do not alter runtime behavior, except that
the kernel won't panic if a driver invariant is violated.

Tested with checkpatch.pl and compile-tested (make M=drivers/staging/most).

Signed-off-by: Olle Lukowski <olle@lukowski.dev>
---
Changes in v2:
- Drop WARN_ON_ONCE() per review (Greg KH). Many systems enable
  panic_on_warn; use plain checks + error returns instead.
- Link to v1: https://lore.kernel.org/r/20251021-staging-most-warn-v1-0-4cdd3745bbdc@lukowski.dev

---
Olle Lukowski (3):
      staging: most: i2c: replace BUG_ON() with proper checks and error returns
      staging: most: dim2: replace BUG_ON() with proper checks and error returns
      staging: most: video: replace BUG_ON() with proper check

 drivers/staging/most/dim2/dim2.c   | 27 +++++++++++++++++++--------
 drivers/staging/most/i2c/i2c.c     |  9 ++++++---
 drivers/staging/most/video/video.c |  3 ++-
 3 files changed, 27 insertions(+), 12 deletions(-)
---
base-commit: 211ddde0823f1442e4ad052a2f30f050145ccada
change-id: 20251021-staging-most-warn-51deb2e454aa

Best regards,
-- 
Olle Lukowski <olle@lukowski.dev>