From e3ef7532a3d2aabec6aaff0b72db42a6ebf03ab6 Mon Sep 17 00:00:00 2001 From: Jonathan Cameron Date: Sat, 8 Oct 2016 17:39:01 +0100 Subject: [PATCH] staging:iio:accel:sca3000 Fix a use before setting of the indio_dev->buffer pointer. Signed-off-by: Jonathan Cameron Reviewed-by: Lars-Peter Clausen --- drivers/staging/iio/accel/sca3000_ring.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/iio/accel/sca3000_ring.c b/drivers/staging/iio/accel/sca3000_ring.c index d1cb9b9cf22b..e5de52d05a5c 100644 --- a/drivers/staging/iio/accel/sca3000_ring.c +++ b/drivers/staging/iio/accel/sca3000_ring.c @@ -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; -- GitLab