diff options
author | Sachin Kamat <sachin.kamat@linaro.org> | 2013-10-24 07:53:00 -0400 |
---|---|---|
committer | Jonathan Cameron <jic23@kernel.org> | 2013-10-24 09:43:24 -0400 |
commit | dcf5272cac4115bfd52afd30e9a8ba5fb9c8d449 (patch) | |
tree | b59825931c6e8f29dccba82bb1831ff3950ebef8 | |
parent | 670c11033dc57c1cf5d9e0056e3c6734e6554d91 (diff) |
iio: accel: kxsd9: Remove redundant variable
Return directly thereby eliminating an intermediate variable.
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
-rw-r--r-- | drivers/iio/accel/kxsd9.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/drivers/iio/accel/kxsd9.c b/drivers/iio/accel/kxsd9.c index 709c13259f14..d72118d1189c 100644 --- a/drivers/iio/accel/kxsd9.c +++ b/drivers/iio/accel/kxsd9.c | |||
@@ -222,7 +222,6 @@ static int kxsd9_probe(struct spi_device *spi) | |||
222 | { | 222 | { |
223 | struct iio_dev *indio_dev; | 223 | struct iio_dev *indio_dev; |
224 | struct kxsd9_state *st; | 224 | struct kxsd9_state *st; |
225 | int ret; | ||
226 | 225 | ||
227 | indio_dev = devm_iio_device_alloc(&spi->dev, sizeof(*st)); | 226 | indio_dev = devm_iio_device_alloc(&spi->dev, sizeof(*st)); |
228 | if (!indio_dev) | 227 | if (!indio_dev) |
@@ -244,11 +243,7 @@ static int kxsd9_probe(struct spi_device *spi) | |||
244 | spi_setup(spi); | 243 | spi_setup(spi); |
245 | kxsd9_power_up(st); | 244 | kxsd9_power_up(st); |
246 | 245 | ||
247 | ret = iio_device_register(indio_dev); | 246 | return iio_device_register(indio_dev); |
248 | if (ret) | ||
249 | return ret; | ||
250 | |||
251 | return 0; | ||
252 | } | 247 | } |
253 | 248 | ||
254 | static int kxsd9_remove(struct spi_device *spi) | 249 | static int kxsd9_remove(struct spi_device *spi) |