Message ID | 1457564931-8963-1-git-send-email-kamal@canonical.com |
---|---|
State | New |
Headers | show |
diff --git a/drivers/iio/inkern.c b/drivers/iio/inkern.c index 4fc88e6..e08b28f 100644 --- a/drivers/iio/inkern.c +++ b/drivers/iio/inkern.c @@ -325,6 +325,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); }