From 30df2d1879ff65af7b269ee94e9c7fc276b54105 Mon Sep 17 00:00:00 2001 From: Julia Lawall Date: Sat, 22 Oct 2016 22:41:32 +0200 Subject: 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 Signed-off-by: Julia Lawall Signed-off-by: Fengguang Wu Signed-off-by: Jonathan Cameron --- drivers/iio/dac/mcp4725.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/iio/dac') 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; } -- cgit v1.2.3