diff options
author | Jonathan Cameron <jic23@cam.ac.uk> | 2011-09-02 20:14:40 +0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-09-07 03:02:01 +0400 |
commit | 26d25ae3f0d8ffe350aacc75b71198d6b35bd1f4 (patch) | |
tree | 8b7867c7cfb8202e5313c462256ebf7e9932a1f1 /drivers/staging/iio/gyro/adis16060_core.c | |
parent | 330c6c57e6284a755d7e8a031b3c917571ee6dc3 (diff) | |
download | linux-26d25ae3f0d8ffe350aacc75b71198d6b35bd1f4.tar.xz |
staging:iio: rework of attribute registration.
This set also includes quite a number of bug fixes of particularly
remove functions.
Necessary due to issue pointed out in Bart Van Assche's patch:
docs/driver-model: Document device.groups
V2: Rebase due to patch reordering.
V3: Pull various error fixes and cleanups out into their own patches.
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Acked-by: Michael Hennerich <Michael.Hennerich@analog.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/iio/gyro/adis16060_core.c')
-rw-r--r-- | drivers/staging/iio/gyro/adis16060_core.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/staging/iio/gyro/adis16060_core.c b/drivers/staging/iio/gyro/adis16060_core.c index 3f5087329e5b..481080588b18 100644 --- a/drivers/staging/iio/gyro/adis16060_core.c +++ b/drivers/staging/iio/gyro/adis16060_core.c @@ -143,7 +143,7 @@ static const struct iio_chan_spec adis16060_channels[] = { static int __devinit adis16060_r_probe(struct spi_device *spi) { - int ret, regdone = 0; + int ret; struct adis16060_state *st; struct iio_dev *indio_dev; @@ -169,16 +169,12 @@ static int __devinit adis16060_r_probe(struct spi_device *spi) ret = iio_device_register(indio_dev); if (ret) goto error_free_dev; - regdone = 1; adis16060_iio_dev = indio_dev; return 0; error_free_dev: - if (regdone) - iio_device_unregister(indio_dev); - else - iio_free_device(indio_dev); + iio_free_device(indio_dev); error_ret: return ret; } |