aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--drivers/staging/iio/accel/lis3l02dq_ring.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/staging/iio/accel/lis3l02dq_ring.c b/drivers/staging/iio/accel/lis3l02dq_ring.c
index c21198d18c9..a6b7c72a86f 100644
--- a/drivers/staging/iio/accel/lis3l02dq_ring.c
+++ b/drivers/staging/iio/accel/lis3l02dq_ring.c
@@ -286,6 +286,7 @@ static void lis3l02dq_trigger_bh_to_ring(struct work_struct *work_s)
rx_array = kmalloc(4 * (st->indio_dev->scan_count), GFP_KERNEL);
if (rx_array == NULL) {
dev_err(&st->us->dev, "memory alloc failed in ring bh");
+ kfree(data);
return;
}