Commit da29461c authored by Cristina Opriceana's avatar Cristina Opriceana Committed by Greg Kroah-Hartman

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: default avatarCristina Opriceana <cristina.opriceana@gmail.com>
Reviewed-by: default avatarDaniel Baluta <daniel.baluta@intel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 5db4851d
...@@ -517,11 +517,7 @@ static int ade7753_probe(struct spi_device *spi) ...@@ -517,11 +517,7 @@ static int ade7753_probe(struct spi_device *spi)
if (ret) if (ret)
return ret; return ret;
ret = iio_device_register(indio_dev); return iio_device_register(indio_dev);
if (ret)
return ret;
return 0;
} }
/* fixme, confirm ordering in this function */ /* fixme, confirm ordering in this function */
......
...@@ -540,11 +540,7 @@ static int ade7754_probe(struct spi_device *spi) ...@@ -540,11 +540,7 @@ static int ade7754_probe(struct spi_device *spi)
ret = ade7754_initial_setup(indio_dev); ret = ade7754_initial_setup(indio_dev);
if (ret) if (ret)
return ret; return ret;
ret = iio_device_register(indio_dev); return iio_device_register(indio_dev);
if (ret)
return ret;
return 0;
} }
/* fixme, confirm ordering in this function */ /* fixme, confirm ordering in this function */
......
...@@ -462,11 +462,7 @@ static int ade7759_probe(struct spi_device *spi) ...@@ -462,11 +462,7 @@ static int ade7759_probe(struct spi_device *spi)
if (ret) if (ret)
return ret; return ret;
ret = iio_device_register(indio_dev); return iio_device_register(indio_dev);
if (ret)
return ret;
return 0;
} }
/* fixme, confirm ordering in this function */ /* fixme, confirm ordering in this function */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment