summaryrefslogtreecommitdiff
path: root/drivers/iio/accel
diff options
context:
space:
mode:
authorSachin Kamat <sachin.kamat@linaro.org>2013-10-24 12:53:00 +0100
committerJonathan Cameron <jic23@kernel.org>2013-10-24 14:43:24 +0100
commitdcf5272cac4115bfd52afd30e9a8ba5fb9c8d449 (patch)
treeb59825931c6e8f29dccba82bb1831ff3950ebef8 /drivers/iio/accel
parent670c11033dc57c1cf5d9e0056e3c6734e6554d91 (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>
Diffstat (limited to 'drivers/iio/accel')
-rw-r--r--drivers/iio/accel/kxsd9.c7
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)
{
struct iio_dev *indio_dev;
struct kxsd9_state *st;
- int ret;
indio_dev = devm_iio_device_alloc(&spi->dev, sizeof(*st));
if (!indio_dev)
@@ -244,11 +243,7 @@ static int kxsd9_probe(struct spi_device *spi)
spi_setup(spi);
kxsd9_power_up(st);
- ret = iio_device_register(indio_dev);
- if (ret)
- return ret;
-
- return 0;
+ return iio_device_register(indio_dev);
}
static int kxsd9_remove(struct spi_device *spi)