linux-stable/drivers/staging
David Schiller c794117a33 staging: iio: ad5933: fix type mismatch regression
commit 6db053cd94 upstream.

Commit 4c3577db3e ("Staging: iio: impedance-analyzer: Fix sparse
warning") fixed a compiler warning, but introduced a bug that resulted
in one of the two 16 bit IIO channels always being zero (when both are
enabled).

This is because int is 32 bits wide on most architectures and in the
case of a little-endian machine the two most significant bytes would
occupy the buffer for the second channel as 'val' is being passed as a
void pointer to 'iio_push_to_buffers()'.

Fix by defining 'val' as u16. Tested working on ARM64.

Fixes: 4c3577db3e ("Staging: iio: impedance-analyzer: Fix sparse warning")
Signed-off-by: David Schiller <david.schiller@jku.at>
Link: https://lore.kernel.org/r/20240122134916.2137957-1-david.schiller@jku.at
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-02-23 09:12:40 +01:00
..
axis-fifo staging: axis-fifo: initialize timeouts in init only 2023-05-24 17:32:40 +01:00
board
emxx_udc
fbtft staging: fbtft: ili9341: use macro FBTFT_REGISTER_SPI_DRIVER 2023-09-13 09:42:23 +02:00
fieldbus
gdm724x net: vlan: introduce skb_vlan_eth_hdr() 2023-12-20 17:00:16 +01:00
greybus
iio staging: iio: ad5933: fix type mismatch regression 2024-02-23 09:12:40 +01:00
ks7010 staging: ks7010: potential buffer overflow in ks_wlan_set_encode_ext() 2023-08-03 10:24:12 +02:00
media media: rkvdec: Hook the (TRY_)DECODER_CMD stateless ioctls 2024-01-25 15:27:32 -08:00
most
nvec
octeon
olpc_dcon
pi433
qlge
r8188eu
rtl8192e Revert "staging: rtl8192e: Replace macro RTL_PCI_DEVICE with PCI_DEVICE" 2023-06-14 11:15:34 +02:00
rtl8192u
rtl8712 staging: rtl8712: fix race condition 2023-09-06 21:27:01 +01:00
rtl8723bs
rts5208
sm750fb
vc04_services staging: vchiq_arm: mark vchiq_platform_init() static 2023-07-19 16:21:52 +02:00
vme_user
vt6655
vt6656
wlan-ng
Kconfig
Makefile