X-Git-Url: https://git.kernelconcepts.de/?a=blobdiff_plain;f=drivers%2Fstaging%2Fiio%2Fadc%2Fad7291.c;h=7194bd138762ce26318e9cbe2d18f621174df206;hb=67b9d76f9e2f9f87f94a11521cc996dc2e43ce14;hp=357cef2a6f4c5c958a61939c0e644a361676a585;hpb=17523680647be26cf792e58f6e8cccb0fd010fd4;p=karo-tx-linux.git diff --git a/drivers/staging/iio/adc/ad7291.c b/drivers/staging/iio/adc/ad7291.c index 357cef2a6f4c..7194bd138762 100644 --- a/drivers/staging/iio/adc/ad7291.c +++ b/drivers/staging/iio/adc/ad7291.c @@ -465,7 +465,7 @@ static int ad7291_probe(struct i2c_client *client, struct ad7291_platform_data *pdata = client->dev.platform_data; struct ad7291_chip_info *chip; struct iio_dev *indio_dev; - int ret = 0; + int ret; indio_dev = devm_iio_device_alloc(&client->dev, sizeof(*chip)); if (!indio_dev) @@ -475,7 +475,7 @@ static int ad7291_probe(struct i2c_client *client, if (pdata && pdata->use_external_ref) { chip->reg = devm_regulator_get(&client->dev, "vref"); if (IS_ERR(chip->reg)) - return ret; + return PTR_ERR(chip->reg); ret = regulator_enable(chip->reg); if (ret)