summaryrefslogtreecommitdiff
path: root/drivers/iio/inkern.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2016-02-10 01:08:37 +0300
committerTakashi Iwai <tiwai@suse.de>2016-02-10 01:08:37 +0300
commit397da2d0ab0d1398242622d80a74df7245395c63 (patch)
tree51e01a67c653c67108f65d063b8b9cbfacf0b1a7 /drivers/iio/inkern.c
parentb8cb3750ce94d7610934465263850dcf40736bca (diff)
parent4dff5c7b7093b19c19d3a100f8a3ad87cb7cd9e7 (diff)
downloadlinux-397da2d0ab0d1398242622d80a74df7245395c63.tar.xz
Merge branch 'topic/core-fixes' into for-linus
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);
}