Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e3ef7532 authored by Jonathan Cameron's avatar Jonathan Cameron
Browse files

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

parent a5750414
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;