linux/drivers/staging/iio
Alison Schofield 19d0541bd2 iio: trigger: free trigger resource correctly
[ Upstream commit 10e840dfb0 ]

These stand-alone trigger drivers were using iio_trigger_put()
where they should have been using iio_trigger_free().  The
iio_trigger_put() adds a module_put which is bad since they
never did a module_get.

In the sysfs driver, module_get/put's are used as triggers are
added & removed. This extra module_put() occurs on an error path
in the probe routine (probably rare).

In the bfin-timer & interrupt trigger drivers, the module resources
are not explicitly managed, so it's doing a put on something that
was never get'd.  It occurs on the probe error path and on the
remove path (not so rare).

Tested with the sysfs trigger driver.
The bfin & interrupt drivers were build tested & inspected only.

Signed-off-by: Alison Schofield <amsfield22@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
History 2017-11-15 15:53:14 +01:00
..
accel iio: accel: sca3000_core: avoid potentially uninitialized variable 2016-10-23 22:18:45 +01:00
adc staging: iio: ad7192: Fix - use the dedicated reset function avoiding dma from stack. 2017-10-12 11:51:18 +02:00
addac iio:core: timestamping clock selection support 2016-06-30 19:41:38 +01:00
cdc iio:core: timestamping clock selection support 2016-06-30 19:41:38 +01:00
Documentation Staging: iio: Documentation: Remove unused sysfs attributes 2016-01-30 16:27:11 +00:00
frequency Staging: iio: ad9832: Replace 'unsigned' with 'unsigned int' 2016-03-28 07:30:36 -07:00
gyro spi: Updates for v4.4 2015-11-05 13:15:12 -08:00
impedance-analyzer staging: iio: ad5933: avoid uninitialized variable in error case 2016-10-25 18:28:52 +01:00
light staging: iio: tsl2x7x_core: Fix standard deviation calculation 2017-06-24 07:11:14 +02:00
meter staging: iio: meter: ade7754: Match alignment with open parenthesis 2016-09-20 13:43:32 +02:00
resolver staging:iio:resolver:ad2s1210 fix negative IIO_ANGL_VEL read 2017-08-16 13:43:19 -07:00
trigger iio: trigger: free trigger resource correctly 2017-11-15 15:53:14 +01:00
Kconfig iio: hmc5843: Move hmc5843 out of staging 2016-02-24 20:40:39 +00:00
Makefile iio: hmc5843: Move hmc5843 out of staging 2016-02-24 20:40:39 +00:00
ring_hw.h staging: iio: Add #include guards to header files 2014-09-28 22:19:04 -04:00
TODO staging:iio: Remove periodic RTC trigger driver 2016-02-27 17:18:38 +00:00