linux-stable/drivers/staging
Lucas Stankus 657f6a33f8 staging: iio: cdc: ad7746: avoid overwrite of num_channels
commit 04f5b9f539 upstream.

AD7745 devices don't have the CIN2 pins and therefore can't handle related
channels. Forcing the number of AD7746 channels may lead to enabling more
channels than what the hardware actually supports.
Avoid num_channels being overwritten after first assignment.

Signed-off-by: Lucas Stankus <lucas.p.stankus@gmail.com>
Fixes: 83e416f458 ("staging: iio: adc: Replace, rewrite ad7745 from scratch.")
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Cc: <Stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-06-03 08:59:04 +02:00
..
android
axis-fifo
board
clocking-wizard
comedi staging: comedi: cb_pcidas64: fix request_irq() warn 2021-04-07 14:47:40 +02:00
emxx_udc
exfat exfat: Month timestamp metadata accidentally incremented 2021-01-17 14:05:34 +01:00
fbtft
fieldbus
fsl-dpaa2
fwserial staging: fwserial: fix TIOCSSERIAL permission check 2021-05-14 09:44:11 +02:00
gasket staging: gasket: interrupt: fix the missed eventfd_ctx_put() in gasket_interrupt.c 2020-12-30 11:51:07 +01:00
gdm724x staging: gdm724x: Fix DMA from stack 2021-03-04 10:26:46 +01:00
goldfish
greybus staging: greybus: uart: fix unprivileged TIOCCSERIAL 2021-05-14 09:44:20 +02:00
gs_fpgaboot
iio staging: iio: cdc: ad7746: avoid overwrite of num_channels 2021-06-03 08:59:04 +02:00
isdn
kpc2000
ks7010 staging: ks7010: prevent buffer overflow in ks_wlan_set_scan() 2021-03-17 17:03:53 +01:00
media media: omap4iss: return error code when omap4iss_get() failed 2021-05-14 09:44:23 +02:00
most staging: most: sound: add sanity check for function argument 2021-03-07 12:20:45 +01:00
mt7621-dma staging/mt7621-dma: mtk-hsdma.c->hsdma-mt7621.c 2021-03-04 10:26:46 +01:00
mt7621-dts
mt7621-pci
mt7621-pci-phy
mt7621-pinctrl
netlogic
nvec
octeon staging/octeon: fix up merge error 2020-12-08 10:40:24 +01:00
octeon-usb
olpc_dcon
pi433
qlge
ralink-gdma staging: ralink-gdma: fix kconfig dependency bug for DMA_RALINK 2020-12-02 08:49:47 +01:00
rtl8188eu staging: rtl8188eu: fix potential memory corruption in rtw_check_beacon_data() 2021-03-17 17:03:53 +01:00
rtl8192e staging: rtl8192e: Change state information from u16 to u8 2021-04-07 14:47:44 +02:00
rtl8192u staging: rtl8192u: Fix potential infinite loop 2021-05-14 09:44:20 +02:00
rtl8712 staging: rtl8712: Fix possible buffer overflow in r8712_sitesurvey_cmd 2021-03-17 17:03:54 +01:00
rtl8723bs staging: rtl8723bs: wifi_regd.c: Fix incorrect number of regulatory rules 2021-03-04 10:26:15 +01:00
rts5208
sm750fb
speakup speakup: fix uninitialized flush_lock 2020-12-30 11:51:22 +01:00
unisys
uwb
vc04_services staging: bcm2835-audio: Replace unsafe strcpy() with strscpy() 2021-03-07 12:20:45 +01:00
vme
vt6655
vt6656
wilc1000
wlan-ng
wusbcore
Kconfig
Makefile