Skip to content

Commit

Permalink
staging:iio:accel:sca3000 Fix a use before setting of the indio_dev->…
Browse files Browse the repository at this point in the history
…buffer pointer.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Reviewed-by: Lars-Peter Clausen <lars@metafoo.de>
  • Loading branch information
Jonathan Cameron committed Oct 23, 2016
1 parent a575041 commit e3ef753
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/staging/iio/accel/sca3000_ring.c
Original file line number Diff line number Diff line change
Expand Up @@ -270,8 +270,8 @@ int sca3000_configure_ring(struct iio_dev *indio_dev)
return -ENOMEM;
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);

return 0;
Expand Down

0 comments on commit e3ef753

Please sign in to comment.