]> Pileus Git - ~andy/linux/commitdiff
iio: accel: kxsd9: Remove redundant variable
authorSachin Kamat <sachin.kamat@linaro.org>
Thu, 24 Oct 2013 11:53:00 +0000 (12:53 +0100)
committerJonathan Cameron <jic23@kernel.org>
Thu, 24 Oct 2013 13:43:24 +0000 (14:43 +0100)
Return directly thereby eliminating an intermediate variable.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
drivers/iio/accel/kxsd9.c

index 709c13259f14e8cab35faee7237794be38c24744..d72118d1189c8648161496919ab17f7ad514df95 100644 (file)
@@ -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)