summaryrefslogtreecommitdiff
path: root/drivers/iio/accel
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-07-20 10:37:31 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-07-20 10:37:31 +0300
commit263771dbc85bc6573b344c193351980c27fd2faa (patch)
tree0232ad4d61cb06d4d75af183b4c6d2058ba27f34 /drivers/iio/accel
parent1f491421c4172ac6d97dcd762a07ae40f110cbac (diff)
parentba47d845d715a010f7b51f6f89bae32845e6acb7 (diff)
downloadlinux-263771dbc85bc6573b344c193351980c27fd2faa.tar.xz
Merge 5.8-rc6 into staging-next
We need the staging fixes in here, and it resolves a merge issue with an iio driver. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/iio/accel')
-rw-r--r--drivers/iio/accel/mma8452.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/iio/accel/mma8452.c b/drivers/iio/accel/mma8452.c
index ef3df402fc3c..ba27f8673131 100644
--- a/drivers/iio/accel/mma8452.c
+++ b/drivers/iio/accel/mma8452.c
@@ -1684,10 +1684,13 @@ static int mma8452_probe(struct i2c_client *client,
ret = mma8452_set_freefall_mode(data, false);
if (ret < 0)
- goto buffer_cleanup;
+ goto unregister_device;
return 0;
+unregister_device:
+ iio_device_unregister(indio_dev);
+
buffer_cleanup:
iio_triggered_buffer_cleanup(indio_dev);