diff options
author | Julia Lawall <julia.lawall@lip6.fr> | 2016-10-22 22:41:32 +0200 |
---|---|---|
committer | Jonathan Cameron <jic23@kernel.org> | 2016-10-23 19:34:27 +0100 |
commit | 30df2d1879ff65af7b269ee94e9c7fc276b54105 (patch) | |
tree | f05716eb07d35de4d10d2a7cdf523eb16e1890fc /drivers/iio/dac | |
parent | dbdef9ba693a5ac7d92368cef7d436b3093e9f4e (diff) | |
download | linux-30df2d1879ff65af7b269ee94e9c7fc276b54105.tar.gz linux-30df2d1879ff65af7b269ee94e9c7fc276b54105.tar.bz2 linux-30df2d1879ff65af7b269ee94e9c7fc276b54105.zip |
iio: dac: mcp4725: fix odd_ptr_err.cocci warnings
PTR_ERR should access the value just tested by IS_ERR
Generated by: scripts/coccinelle/tests/odd_ptr_err.cocci
CC: Tomas Novotny <tomas@novotny.cz>
Signed-off-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Diffstat (limited to 'drivers/iio/dac')
-rw-r--r-- | drivers/iio/dac/mcp4725.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/iio/dac/mcp4725.c b/drivers/iio/dac/mcp4725.c index fae80eb1a98a..db109f0cdd8c 100644 --- a/drivers/iio/dac/mcp4725.c +++ b/drivers/iio/dac/mcp4725.c @@ -449,7 +449,7 @@ static int mcp4725_probe(struct i2c_client *client, if (pdata->use_vref) { data->vref_reg = devm_regulator_get(&client->dev, "vref"); if (IS_ERR(data->vref_reg)) { - err = PTR_ERR(data->vdd_reg); + err = PTR_ERR(data->vref_reg); goto err_disable_vdd_reg; } |