All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] Make cb a required parameter of buffer-cb
@ 2020-11-21 16:14 ` Nuno Sá
  0 siblings, 0 replies; 14+ messages in thread
From: Nuno Sá @ 2020-11-21 16:14 UTC (permalink / raw)
  To: linux-iio, alsa-devel
  Cc: Jonathan Cameron, Lars-Peter Clausen, Peter Meerwald-Stadler,
	Olivier Moysan, Arnaud Pouliquen, Takashi Iwai, Mark Brown,
	Jaroslav Kysela, Liam Girdwood

When going through the code of the buffer-cb interface and all it's
users, I realized that the stm32_adfsdm driver is calling
`iio_channel_get_all_cb()` with NULL for the cb. After going a bit
trough the stm drivers, it looks like this is actually intentional.
However, it is clear that we have a clear/direct route here for a NULL
pointer dereference. This change makes cb a required parameter of the
API.

The first patch makes the necessary changes to the stm32_adfsdm driver
so that it does not break.

Nuno Sá (1):
  iio: buffer: Return error if no callback is given

Olivier Moysan (1):
  ASoC: stm32: dfsdm: add stm32_adfsdm_dummy_cb() callback

 drivers/iio/buffer/industrialio-buffer-cb.c |  5 +++++
 sound/soc/stm/stm32_adfsdm.c                | 12 +++++++++++-
 2 files changed, 16 insertions(+), 1 deletion(-)

-- 
2.17.1


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

end of thread, other threads:[~2020-11-28 22:22 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-21 16:14 [PATCH 0/2] Make cb a required parameter of buffer-cb Nuno Sá
2020-11-21 16:14 ` Nuno Sá
2020-11-21 16:14 ` [PATCH 1/2] ASoC: stm32: dfsdm: add stm32_adfsdm_dummy_cb() callback Nuno Sá
2020-11-21 16:14   ` Nuno Sá
2020-11-23 13:51   ` Mark Brown
2020-11-23 13:51     ` Mark Brown
2020-11-21 16:14 ` [PATCH 2/2] iio: buffer: Return error if no callback is given Nuno Sá
2020-11-21 16:14   ` Nuno Sá
2020-11-23  8:40   ` Olivier MOYSAN
2020-11-23  8:40     ` Olivier MOYSAN
2020-11-22 16:19 ` [PATCH 0/2] Make cb a required parameter of buffer-cb Jonathan Cameron
2020-11-22 16:19   ` Jonathan Cameron
2020-11-28 13:25 ` Jonathan Cameron
2020-11-28 13:25   ` Jonathan Cameron

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.