diff mbox series

[v2,2/3] staging: iio: cdc: ad7746: clean up probe return

Message ID 45443b8306893576824effaff57d40231de8e813.1621786036.git.lucas.p.stankus@gmail.com (mailing list archive)
State Accepted, archived
Headers show
Series staging: iio: cdc: ad7746: initial effort to move out of staging | expand

Commit Message

Lucas Stankus May 23, 2021, 5:12 p.m. UTC
Slight simplication of the probe return on device register.

Signed-off-by: Lucas Stankus <lucas.p.stankus@gmail.com>
---
 drivers/staging/iio/cdc/ad7746.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

Comments

Alexandru Ardelean May 24, 2021, 7:53 a.m. UTC | #1
On Sun, May 23, 2021 at 8:12 PM Lucas Stankus <lucas.p.stankus@gmail.com> wrote:
>
> Slight simplication of the probe return on device register.
>

Reviewed-by: Alexandru Ardelean <ardeleanalex@gmail.com>

> Signed-off-by: Lucas Stankus <lucas.p.stankus@gmail.com>
> ---
>  drivers/staging/iio/cdc/ad7746.c | 6 +-----
>  1 file changed, 1 insertion(+), 5 deletions(-)
>
> diff --git a/drivers/staging/iio/cdc/ad7746.c b/drivers/staging/iio/cdc/ad7746.c
> index 12b2554a85b5..367a5990ae35 100644
> --- a/drivers/staging/iio/cdc/ad7746.c
> +++ b/drivers/staging/iio/cdc/ad7746.c
> @@ -734,11 +734,7 @@ static int ad7746_probe(struct i2c_client *client,
>         if (ret < 0)
>                 return ret;
>
> -       ret = devm_iio_device_register(indio_dev->dev.parent, indio_dev);
> -       if (ret)
> -               return ret;
> -
> -       return 0;
> +       return devm_iio_device_register(indio_dev->dev.parent, indio_dev);
>  }
>
>  static const struct i2c_device_id ad7746_id[] = {
> --
> 2.31.1
>
diff mbox series

Patch

diff --git a/drivers/staging/iio/cdc/ad7746.c b/drivers/staging/iio/cdc/ad7746.c
index 12b2554a85b5..367a5990ae35 100644
--- a/drivers/staging/iio/cdc/ad7746.c
+++ b/drivers/staging/iio/cdc/ad7746.c
@@ -734,11 +734,7 @@  static int ad7746_probe(struct i2c_client *client,
 	if (ret < 0)
 		return ret;
 
-	ret = devm_iio_device_register(indio_dev->dev.parent, indio_dev);
-	if (ret)
-		return ret;
-
-	return 0;
+	return devm_iio_device_register(indio_dev->dev.parent, indio_dev);
 }
 
 static const struct i2c_device_id ad7746_id[] = {