提交 7b762741 编写于 作者: J Jonathan Cameron

iio: Fix inkern remove incorrect put of device

The device_get is after this point so on error we should not be
removing it.
Signed-off-by: NJonathan Cameron <jic23@kernel.org>
上级 462c8d27
...@@ -193,7 +193,6 @@ struct iio_channel *iio_channel_get_all(const char *name) ...@@ -193,7 +193,6 @@ struct iio_channel *iio_channel_get_all(const char *name)
c->map->adc_channel_label); c->map->adc_channel_label);
if (chans[mapind].channel == NULL) { if (chans[mapind].channel == NULL) {
ret = -EINVAL; ret = -EINVAL;
iio_device_put(chans[mapind].indio_dev);
goto error_free_chans; goto error_free_chans;
} }
iio_device_get(chans[mapind].indio_dev); iio_device_get(chans[mapind].indio_dev);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册