Commit 30df2d18 authored by Julia Lawall's avatar Julia Lawall Committed by Jonathan Cameron

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: default avatarJulia Lawall <julia.lawall@lip6.fr>
Signed-off-by: default avatarFengguang Wu <fengguang.wu@intel.com>
Signed-off-by: default avatarJonathan Cameron <jic23@kernel.org>
parent dbdef9ba
...@@ -449,7 +449,7 @@ static int mcp4725_probe(struct i2c_client *client, ...@@ -449,7 +449,7 @@ static int mcp4725_probe(struct i2c_client *client,
if (pdata->use_vref) { if (pdata->use_vref) {
data->vref_reg = devm_regulator_get(&client->dev, "vref"); data->vref_reg = devm_regulator_get(&client->dev, "vref");
if (IS_ERR(data->vref_reg)) { if (IS_ERR(data->vref_reg)) {
err = PTR_ERR(data->vdd_reg); err = PTR_ERR(data->vref_reg);
goto err_disable_vdd_reg; goto err_disable_vdd_reg;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment