summaryrefslogtreecommitdiffstats
path: root/drivers/iio/inkern.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-02-01 13:07:38 -0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-02-01 13:07:38 -0800
commit48436e82fd2925a42293f670f3570b5c855c90c1 (patch)
treeb1a287422058b4ce42995b7f24a03c01fd3b54a2 /drivers/iio/inkern.c
parent8d9b39c6499b113ef9218c80682de114beffe7bb (diff)
parent7e1da86339f29e445e40d41132c30741df8c19ad (diff)
downloadblackbird-op-linux-48436e82fd2925a42293f670f3570b5c855c90c1.tar.gz
blackbird-op-linux-48436e82fd2925a42293f670f3570b5c855c90c1.zip
Merge tag 'iio-fixes-for-4.5a' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-linus
Jonathan writes: First set of IIO fixes for the 4.5 cycle. This set comprises those not dependent on patches in the 4.5 merge cycle. A second set will follow shortly with ones that are. * core in kernel interfaces - fix a possible NULL dereference that is a theoretical possibility via odd usage of iio_channel_release. Pretty much a hardening of the interface, but observed in the wild with the twl4030_charger driver. * acpi-als - report the data as processed as it is in lux. This fixes a wrong use of the IIO ABI. However, old _raw version retained to avoid breaking any userspace in the wild that is relying on that (none known but it doesn't hurt us much to retain it) * ade7753 - fix some error handling to avoid use of unitialized data. * ltr501 - use a signed return type for ltr501_match_samp_freq so as to allow returning of an error code. * mcp4725 - set name field of struct iio_dev to ensure the sysfs name attribute doesn't give NULL. * mpl115 - temperature offset sign is wrong. * stk8ba50 - IIO_TRIGGER dependency added * ti_am335x_adc - Label buffer as a software buffer. It's actually a hybrid of a true hardware buffer feeding a kfifo, but the meaning of these fields has changed a little recently and in this case it should be labeled a software buffer ensure it is allowed to use the kfifo. * vf610_adc - HAS_IOMEM dependency
Diffstat (limited to 'drivers/iio/inkern.c')
-rw-r--r--drivers/iio/inkern.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/iio/inkern.c b/drivers/iio/inkern.c
index 80fbbfd76faf..734a0042de0c 100644
--- a/drivers/iio/inkern.c
+++ b/drivers/iio/inkern.c
@@ -349,6 +349,8 @@ EXPORT_SYMBOL_GPL(iio_channel_get);
void iio_channel_release(struct iio_channel *channel)
{
+ if (!channel)
+ return;
iio_device_put(channel->indio_dev);
kfree(channel);
}
OpenPOWER on IntegriCloud