Message ID | 1457483454-30115-26-git-send-email-kamal@canonical.com |
---|---|
State | New |
Headers | show |
diff --git a/drivers/iio/inkern.c b/drivers/iio/inkern.c index 90c8cb7..1bbb7f4 100644 --- a/drivers/iio/inkern.c +++ b/drivers/iio/inkern.c @@ -348,6 +348,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); }