linux/drivers/iio/chemical
Dmitry Rokosov d710359c0b iio:chemical:ccs811: rearrange iio trigger get and register
IIO trigger interface function iio_trigger_get() should be called after
iio_trigger_register() (or its devm analogue) strictly, because of
iio_trigger_get() acquires module refcnt based on the trigger->owner
pointer, which is initialized inside iio_trigger_register() to
THIS_MODULE.
If this call order is wrong, the next iio_trigger_put() (from sysfs
callback or "delete module" path) will dereference "default" module
refcnt, which is incorrect behaviour.

Fixes: f1f065d7ac ("iio: chemical: ccs811: Add support for data ready trigger")
Signed-off-by: Dmitry Rokosov <ddrokosov@sberdevices.ru>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Link: https://lore.kernel.org/r/20220524181150.9240-5-ddrokosov@sberdevices.ru
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2022-06-19 17:22:49 +01:00
..
ams-iaq-core.c iio:chemical:ams-iaq-core: Drop of_match_ptr protection 2020-09-21 18:41:31 +01:00
atlas-ezo-sensor.c iio: chemical: atlas-ezo-sensor: Make use of device properties 2022-02-13 18:06:58 +00:00
atlas-sensor.c iio:chemical:atlas: Switch from CONFIG_PM guards to pm_ptr() etc 2022-02-21 19:33:04 +00:00
bme680_core.c iio:chemical:bme680: Move exports to IIO_BME680 namespace 2022-02-18 11:42:27 +00:00
bme680_i2c.c iio:chemical:bme680: Move exports to IIO_BME680 namespace 2022-02-18 11:42:27 +00:00
bme680_spi.c iio:chemical:bme680: Move exports to IIO_BME680 namespace 2022-02-18 11:42:27 +00:00
bme680.h iio:chemical:bme680: Fix SPI read interface 2019-03-09 17:27:36 +00:00
ccs811.c iio:chemical:ccs811: rearrange iio trigger get and register 2022-06-19 17:22:49 +01:00
Kconfig drivers: iio: chemical: Add support for Sensirion SCD4x CO2 sensor 2021-10-19 08:30:44 +01:00
Makefile drivers: iio: chemical: Add support for Sensirion SCD4x CO2 sensor 2021-10-19 08:30:44 +01:00
pms7003.c iio: chemical: pms7003: convert comma to semicolon 2021-01-09 14:25:28 +00:00
scd4x.c iio: scd4x: check return of scd4x_write_and_fetch 2022-04-04 09:19:01 +01:00
scd30_core.c iio: core: move @id from struct iio_dev to struct iio_dev_opaque 2021-05-17 13:49:13 +01:00
scd30_i2c.c iio: chemical: scd30: add I2C interface driver 2020-06-27 14:50:30 +01:00
scd30_serial.c iio: use getter/setter functions 2021-03-11 20:47:07 +00:00
scd30.h iio: chemical: scd30: add core driver 2020-06-27 14:46:44 +01:00
sgp30.c iio: chemical: sgp30: Drop use of %hx in format string. 2021-06-03 18:24:13 +01:00
sgp40.c iio: chemical: Add driver support for sgp40 2021-08-08 15:19:18 +01:00
sps30_i2c.c iio: sps30: separate core and interface specific code 2021-05-17 13:49:10 +01:00
sps30_serial.c iio: sps30: add support for serial interface 2021-05-17 13:49:10 +01:00
sps30.c iio: sps30: Use sysfs_emit() 2022-01-23 18:03:37 +00:00
sps30.h iio: sps30: separate core and interface specific code 2021-05-17 13:49:10 +01:00
sunrise_co2.c iio: chemical: sunrise_co2: set val parameter only on success 2021-12-28 18:37:41 +00:00
vz89x.c iio: vz89x: Remove unnecessary cast 2021-12-16 16:34:54 +00:00