Staging: iio: Simplify return logic

This patch removes the conditional return of the ade77*_probe functions
based on the return values of iio_device_register as the latter
returns 0 or ret, the same as the checked values.

Warning found by coccinelle.

Signed-off-by: Cristina Opriceana <cristina.opriceana@gmail.com>
Reviewed-by: Daniel Baluta <daniel.baluta@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Cristina Opriceana 2015-03-12 19:10:31 +02:00 committed by Greg Kroah-Hartman
parent 5db4851d47
commit da29461ccd
3 changed files with 3 additions and 15 deletions

View file

@ -517,11 +517,7 @@ static int ade7753_probe(struct spi_device *spi)
if (ret)
return ret;
ret = iio_device_register(indio_dev);
if (ret)
return ret;
return 0;
return iio_device_register(indio_dev);
}
/* fixme, confirm ordering in this function */

View file

@ -540,11 +540,7 @@ static int ade7754_probe(struct spi_device *spi)
ret = ade7754_initial_setup(indio_dev);
if (ret)
return ret;
ret = iio_device_register(indio_dev);
if (ret)
return ret;
return 0;
return iio_device_register(indio_dev);
}
/* fixme, confirm ordering in this function */

View file

@ -462,11 +462,7 @@ static int ade7759_probe(struct spi_device *spi)
if (ret)
return ret;
ret = iio_device_register(indio_dev);
if (ret)
return ret;
return 0;
return iio_device_register(indio_dev);
}
/* fixme, confirm ordering in this function */