提交 e3ef7532 编写于 作者: J Jonathan Cameron

staging:iio:accel:sca3000 Fix a use before setting of the indio_dev->buffer pointer.

Signed-off-by: NJonathan Cameron <jic23@kernel.org>
Reviewed-by: NLars-Peter Clausen <lars@metafoo.de>
上级 a5750414
...@@ -270,8 +270,8 @@ int sca3000_configure_ring(struct iio_dev *indio_dev) ...@@ -270,8 +270,8 @@ int sca3000_configure_ring(struct iio_dev *indio_dev)
return -ENOMEM; return -ENOMEM;
indio_dev->modes |= INDIO_BUFFER_HARDWARE; indio_dev->modes |= INDIO_BUFFER_HARDWARE;
indio_dev->buffer->access = &sca3000_ring_access_funcs;
buffer->access = &sca3000_ring_access_funcs;
iio_device_attach_buffer(indio_dev, buffer); iio_device_attach_buffer(indio_dev, buffer);
return 0; return 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册