linux/drivers/iio/adc
Lukas Wunner 0964e40947 iio: adc: mcp320x: Fix oops on module unload
The driver calls spi_get_drvdata() in its ->remove hook even though it
has never called spi_set_drvdata().  Stack trace for posterity:

Unable to handle kernel NULL pointer dereference at virtual address 00000220
Internal error: Oops: 5 [#1] SMP ARM
[<8072f564>] (mutex_lock) from [<7f1400d0>] (iio_device_unregister+0x24/0x7c [industrialio])
[<7f1400d0>] (iio_device_unregister [industrialio]) from [<7f15e020>] (mcp320x_remove+0x20/0x30 [mcp320x])
[<7f15e020>] (mcp320x_remove [mcp320x]) from [<8055a8cc>] (spi_drv_remove+0x2c/0x44)
[<8055a8cc>] (spi_drv_remove) from [<805087bc>] (__device_release_driver+0x98/0x134)
[<805087bc>] (__device_release_driver) from [<80509180>] (driver_detach+0xdc/0xe0)
[<80509180>] (driver_detach) from [<8050823c>] (bus_remove_driver+0x5c/0xb0)
[<8050823c>] (bus_remove_driver) from [<80509ab0>] (driver_unregister+0x38/0x58)
[<80509ab0>] (driver_unregister) from [<7f15e69c>] (mcp320x_driver_exit+0x14/0x1c [mcp320x])
[<7f15e69c>] (mcp320x_driver_exit [mcp320x]) from [<801a78d0>] (SyS_delete_module+0x184/0x1d0)
[<801a78d0>] (SyS_delete_module) from [<80108100>] (ret_fast_syscall+0x0/0x1c)

Fixes: f5ce4a7a92 ("iio: adc: add driver for MCP3204/08 12-bit ADC")
Cc: Oskar Andero <oskar.andero@gmail.com>
Signed-off-by: Lukas Wunner <lukas@wunner.de>
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2017-09-24 16:58:03 +01:00
..
ad799x.c iio: adc: ad799x: constify attribute_group structures 2017-03-29 22:12:41 +01:00
ad7266.c
ad7291.c
ad7298.c
ad7476.c
ad7766.c iio: adc: ad7766: Remove unneeded gpiod NULL check 2017-07-17 21:47:31 +01:00
ad7791.c iio: adc: ad7791: Use sysfs_match_string() helper 2017-06-11 15:07:35 +01:00
ad7793.c
ad7887.c
ad7923.c
ad_sigma_delta.c
aspeed_adc.c First set of IIO fixes for the 4.13 cycle. 2017-07-23 20:54:31 -07:00
at91-sama5d2_adc.c iio:adc:at91-sama5d2: make array startup_lookup static to reduce code size 2017-07-09 19:14:05 +01:00
at91_adc.c iio: adc: at91: make array startup_lookup static 2017-07-10 22:00:17 +01:00
axp20x_adc.c iio: adc: add support for X-Powers AXP20X and AXP22X PMICs ADCs 2017-04-27 09:25:07 +01:00
axp288_adc.c iio: adc: axp288: Fix the GPADC pin reading often wrongly returning 0 2017-07-09 21:16:28 +01:00
bcm_iproc_adc.c iio: adc: bcm_iproc_adc: swap primary and secondary isr handler's 2017-05-21 13:01:17 +01:00
berlin2-adc.c
cc10001_adc.c
cpcap-adc.c iio: adc: cpcap: Remove hung interrupt quirk 2017-06-03 08:43:17 +01:00
da9150-gpadc.c
dln2-adc.c iio: adc: Add support for DLN2 ADC 2017-07-09 18:17:18 +01:00
envelope-detector.c
ep93xx_adc.c iio: adc: New driver for Cirrus Logic EP93xx ADC 2017-07-25 19:56:23 +01:00
exynos_adc.c iio: adc: Remove unnecessary cast on void pointer 2017-04-02 09:46:25 +01:00
fsl-imx25-gcq.c
hi8435.c Revert "iio: hi8435: cleanup reset gpio" 2017-06-03 09:55:24 +01:00
hx711.c iio: adc: hx711: constify attribute_group structures 2017-04-01 11:39:04 +01:00
imx7d_adc.c iio: adc: Remove unnecessary cast on void pointer 2017-04-02 09:46:25 +01:00
ina2xx-adc.c iio: adc: Fix polling of INA219 conversion ready flag 2017-07-01 10:16:47 +01:00
Kconfig iio: adc: select triggered buffer for sama5d2 adc 2017-08-17 15:37:14 +01:00
lp8788_adc.c
lpc18xx_adc.c
lpc32xx_adc.c iio:adc:lpc32xx Handle return value of clk_prepare_enable 2017-06-03 09:55:25 +01:00
ltc2471.c iio: Add LTC2471/LTC2473 driver 2017-07-04 20:50:04 +01:00
ltc2485.c
ltc2497.c iio:adc:ltc2497: Add support for board file based iio consumer mapping. 2017-07-02 10:24:53 +01:00
Makefile iio: adc: New driver for Cirrus Logic EP93xx ADC 2017-07-25 19:56:23 +01:00
max1027.c iio: adc: Remove unnecessary cast on void pointer 2017-04-02 09:46:25 +01:00
max1118.c iio: adc: add max1117/max1118/max1119 ADC driver 2017-04-14 15:09:06 +01:00
max1363.c iio: adc: max1363: constify attribute_group structures 2017-03-29 22:10:58 +01:00
max9611.c iio: Convert to using %pOF instead of full_name 2017-07-22 22:00:43 +01:00
max11100.c iio: adc: replace comma with a semicolon 2017-03-30 19:11:27 +01:00
mcp320x.c iio: adc: mcp320x: Fix oops on module unload 2017-09-24 16:58:03 +01:00
mcp3422.c iio: adc: mcp3422: Checking for error on probe 2017-07-02 10:24:52 +01:00
men_z188_adc.c
meson_saradc.c iio: Convert to using %pOF instead of full_name 2017-07-22 22:00:43 +01:00
mt6577_auxadc.c iio: adc: mt7622: Add compatible node for mt7622. 2017-07-01 10:20:28 +01:00
mxs-lradc-adc.c Second set of IIO new device support, features and cleanups for the 4.13 cycle. 2017-06-26 07:09:23 +02:00
nau7802.c
palmas_gpadc.c
qcom-pm8xxx-xoadc.c iio: adc: add a driver for Qualcomm PM8xxx HK/XOADC 2017-04-08 17:42:26 +01:00
qcom-spmi-iadc.c
qcom-spmi-vadc.c iio: adc: break out common code from SPMI VADC 2017-04-08 17:40:49 +01:00
qcom-vadc-common.c iio: adc: break out common code from SPMI VADC 2017-04-08 17:40:49 +01:00
qcom-vadc-common.h iio: adc: break out common code from SPMI VADC 2017-04-08 17:40:49 +01:00
rcar-gyroadc.c iio: adc: rcar-gyroadc: Derive interface clock speed from fck clock 2017-04-27 05:58:03 +01:00
rockchip_saradc.c iio: adc: rockchip_saradc: explicitly request exclusive reset control 2017-08-20 15:41:18 +01:00
spear_adc.c
stm32-adc-core.c iio: adc: stm32: make array stm32h7_adc_ckmodes_spec static 2017-07-02 10:24:52 +01:00
stm32-adc-core.h iio: adc: stm32: add support for STM32H7 2017-06-11 15:07:29 +01:00
stm32-adc.c iio: adc: stm32: fix bad error check on max_channels 2017-09-24 14:07:28 +01:00
stx104.c Annotation of module parameters that specify device settings 2017-05-10 19:13:03 -07:00
sun4i-gpadc-iio.c iio: adc: sun4i-gpadc-iio: fix unbalanced irq enable/disable 2017-07-04 20:28:34 +01:00
ti-adc081c.c
ti-adc084s021.c iio: adc: add driver for the ti-adc084s021 chip 2017-05-14 16:34:11 +01:00
ti-adc108s102.c iio: adc: Add support for TI ADC108S102 and ADC128S102 2017-05-21 15:11:14 +01:00
ti-adc128s052.c
ti-adc161s626.c
ti-adc0832.c
ti-adc12138.c
ti-ads1015.c iio: adc: ti-ads1015: fix comparator polarity setting 2017-09-03 17:09:32 +01:00
ti-ads7950.c iio: adc: ti-ads7950: Allow to use on ACPI platforms 2017-08-20 15:41:11 +01:00
ti-ads8688.c
ti-tlc4541.c
ti_am335x_adc.c iio: adc: ti_am335x_adc: allocating too much in probe 2017-05-14 16:21:13 +01:00
twl4030-madc.c iio: adc: twl4030: Return an error if we can not enable the vusb3v1 regulator in 'twl4030_madc_probe()' 2017-09-24 13:04:07 +01:00
twl6030-gpadc.c
vf610_adc.c iio: adc: vf610_adc: Fix VALT selection value for REFSEL bits 2017-07-06 19:39:28 +01:00
viperboard_adc.c
xilinx-xadc-core.c iio: adc: xilinx: Handle return value of clk_prepare_enable 2017-06-03 09:55:23 +01:00
xilinx-xadc-events.c iio: adc: xadc: Fix coding style violations 2017-08-12 13:10:30 +01:00
xilinx-xadc.h iio: adc: xadc: Fix coding style violations 2017-08-12 13:10:30 +01:00