提交 30df2d18 编写于 作者: J Julia Lawall 提交者: 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: NJulia Lawall <julia.lawall@lip6.fr>
Signed-off-by: NFengguang Wu <fengguang.wu@intel.com>
Signed-off-by: NJonathan Cameron <jic23@kernel.org>
上级 dbdef9ba
......@@ -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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册