summaryrefslogtreecommitdiff
path: root/drivers/iio/industrialio-trigger.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-05-22 22:53:09 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-05-22 22:53:09 +0300
commit5a4733df7ef255446a213ee84efa5713a9765688 (patch)
treef921b8c8f251b7b7b7ad17f75eb5f98c21cc0baa /drivers/iio/industrialio-trigger.c
parent08332893e37af6ae779367e78e444f8f9571511d (diff)
parent82237f268281d338aa35cd014be8ffb0b5445482 (diff)
downloadlinux-5a4733df7ef255446a213ee84efa5713a9765688.tar.xz
Merge tag 'iio-fixes-for-4.12a' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-linus
Jonathan writes: First set of IIO fixes in the 4.12 cycle. Matt finally set up the lightning storm he needed to test the as3935. * core - Fix a null pointer deference in iio_trigger_write_current when changing from a non existent trigger to another non existent trigger. * a3935 - Recalibrate the RCO after resume. - Fix interrupt mask so that we actually get some interrupts. - Use iio_trigger_poll_chained as we aren't in interrupt context. * am335x - Fix wrong allocation size provided for private data to iio_device_alloc. * bcm_iproc - Swapped primary and secondary isr handlers. * ltr501 - Fix swapped als/ps register fields when enabling interrupts * max9611 - Wrong scale factor for the shunt_resistor attribute. * sun4-gpadc - Module autoloading fixes by adding the device table declarations. - Fix parent device being used in devm functions.
Diffstat (limited to 'drivers/iio/industrialio-trigger.c')
-rw-r--r--drivers/iio/industrialio-trigger.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/iio/industrialio-trigger.c b/drivers/iio/industrialio-trigger.c
index 978e1592c2a3..4061fed93f1f 100644
--- a/drivers/iio/industrialio-trigger.c
+++ b/drivers/iio/industrialio-trigger.c
@@ -451,7 +451,8 @@ static ssize_t iio_trigger_write_current(struct device *dev,
return len;
out_trigger_put:
- iio_trigger_put(trig);
+ if (trig)
+ iio_trigger_put(trig);
return ret;
}