staging: iio: cdc: ad7746: clean up probe return
authorLucas Stankus <lucas.p.stankus@gmail.com>
Sun, 23 May 2021 17:12:16 +0000 (14:12 -0300)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Thu, 3 Jun 2021 17:24:14 +0000 (18:24 +0100)
Slight simplication of the probe return on device register.

Signed-off-by: Lucas Stankus <lucas.p.stankus@gmail.com>
Reviewed-by: Alexandru Ardelean <ardeleanalex@gmail.com>
Link: https://lore.kernel.org/r/45443b8306893576824effaff57d40231de8e813.1621786036.git.lucas.p.stankus@gmail.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/staging/iio/cdc/ad7746.c

index 12b2554..367a599 100644 (file)
@@ -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[] = {