aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/iio/accel/mma8452.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-07-20 09:37:31 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-07-20 09:37:31 +0200
commit263771dbc85bc6573b344c193351980c27fd2faa (patch)
tree0232ad4d61cb06d4d75af183b4c6d2058ba27f34 /drivers/iio/accel/mma8452.c
parentstaging: rtl8188eu: include: fixed multiple blank space coding style issues (diff)
parentLinux 5.8-rc6 (diff)
downloadlinux-dev-263771dbc85bc6573b344c193351980c27fd2faa.tar.xz
linux-dev-263771dbc85bc6573b344c193351980c27fd2faa.zip
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/mma8452.c')
-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);