diff options
Diffstat (limited to 'drivers/staging/iio/meter/ade7759.c')
-rw-r--r-- | drivers/staging/iio/meter/ade7759.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/staging/iio/meter/ade7759.c b/drivers/staging/iio/meter/ade7759.c index 511a605..b691f10 100644 --- a/drivers/staging/iio/meter/ade7759.c +++ b/drivers/staging/iio/meter/ade7759.c @@ -502,11 +502,12 @@ static int ade7759_remove(struct spi_device *spi) int ret; struct iio_dev *indio_dev = spi_get_drvdata(spi); + iio_device_unregister(indio_dev); ret = ade7759_stop_device(&(indio_dev->dev)); if (ret) goto err_ret; - iio_device_unregister(indio_dev); + iio_free_device(indio_dev); err_ret: return ret; |