mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 0/4] iio: accel: reject SPI devices without match data
@ 2026-09-25 12:43 Jiale Yao
  2026-09-25 12:43 ` [PATCH 1/4] iio: accel: adxl313: reject " Jiale Yao
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Jiale Yao @ 2026-09-25 12:43 UTC (permalink / raw)
  To: Lucas Stankus, Nuno Sá,
	Michael Hennerich, Jonathan Cameron, David Lechner,
	Andy Shevchenko, Marcelo Schmitt, Antoniu Miclaus,
	Ramona Gradinariu, Harshit Mogalapalli, Linus Walleij,
	Uwe Kleine-König (The Capable Hub),
	Krzysztof Kozlowski, linux, linux-iio, linux-kernel
  Cc: Jiale Yao

SPI driver_override can bind a device to a driver without a matching OF
entry or SPI device ID. In that case, spi_get_device_match_data() returns
NULL.

The ADXL313, ADXL372, ADXL380, and SCA3000 SPI probe paths assume that the
returned chip information is present and later dereference it. Reject
devices without match data before the pointer is used, following the
handling added to the AD5686 bus frontends by commit 572a00852635 ("iio:
dac: ad5686: missing NULL check on match data").

Each patch fixes one driver and can be applied independently.

Jiale Yao (4):
  iio: accel: adxl313: reject devices without match data
  iio: accel: adxl372: reject devices without match data
  iio: accel: adxl380: reject devices without match data
  iio: accel: sca3000: reject devices without match data

 drivers/iio/accel/adxl313_spi.c | 2 ++
 drivers/iio/accel/adxl372_spi.c | 2 ++
 drivers/iio/accel/adxl380_spi.c | 2 ++
 drivers/iio/accel/sca3000.c     | 2 ++
 4 files changed, 8 insertions(+)

base-commit: 93f51579e7df248780214094418f205253383cc5
-- 
2.34.1


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2026-09-27 17:51 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-25 12:43 [PATCH 0/4] iio: accel: reject SPI devices without match data Jiale Yao
2026-09-25 12:43 ` [PATCH 1/4] iio: accel: adxl313: reject " Jiale Yao
2026-09-25 12:43 ` [PATCH 2/4] iio: accel: adxl372: " Jiale Yao
2026-09-25 12:43 ` [PATCH 3/4] iio: accel: adxl380: " Jiale Yao
2026-09-25 12:43 ` [PATCH 4/4] iio: accel: sca3000: " Jiale Yao
2026-09-27 17:51 ` [PATCH 0/4] iio: accel: reject SPI " Jonathan Cameron

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®