On 10/24/13 12:53, Sachin Kamat wrote: > Return directly thereby eliminating an intermediate variable. > > Signed-off-by: Sachin Kamat <sachin.kamat@xxxxxxxxxx> Applied to the togreg branch of iio.git Thanks, > --- > drivers/iio/accel/kxsd9.c | 7 +------ > 1 file changed, 1 insertion(+), 6 deletions(-) > > diff --git a/drivers/iio/accel/kxsd9.c b/drivers/iio/accel/kxsd9.c > index 709c132..d72118d 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) > -- To unsubscribe from this list: send the line "unsubscribe linux-iio" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html