diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-06-29 09:43:23 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-06-29 09:43:23 -0700 |
commit | 6b64168de843b16e96a22f9e98c6afc92ee1da71 (patch) | |
tree | 6454d5021b9abfcb70ebcc52c726c0926f3775d0 /drivers/staging | |
parent | ff4f58f0ca5dee33a80a72393dd195de9284702b (diff) | |
parent | a2c12493ed7e63a18cef33a71686d12ffcd6600e (diff) | |
download | talos-op-linux-6b64168de843b16e96a22f9e98c6afc92ee1da71.tar.gz talos-op-linux-6b64168de843b16e96a22f9e98c6afc92ee1da71.zip |
Merge tag 'iio-fixes-for-3.16b' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-linus
Jonathan writes:
Second set of IIO fixes for the 3.16 cycle.
* A fix for a bug in setting threshold levels within the ad799x driver
which prevents correct setting of the thresholds.
* In ad7291 fix an case where a ERR_PTR value was returned directly
instead of having PTR_ERR applied. Hence it would report success
instead of failure.
* of_iio_channel_get_by_name returned a non null pointer if it fails
and the callee was expecting NULL to indicate failure. Fixed by
returning NULL in the error cases.
Diffstat (limited to 'drivers/staging')
-rw-r--r-- | drivers/staging/iio/adc/ad7291.c | 4 |
1 files changed, 2 insertions, 2 deletions
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) |