Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

iio: adc: ti-ads1298: Fix error code in probe()

There is a copy and paste bug here, it should be "reg_vref" instead of
"reg_avdd". The "priv->reg_avdd" variable is zero so it ends up
returning success.

Fixes: 00ef7708fa60 ("iio: adc: ti-ads1298: Add driver")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Acked-by: Mike Looijmans <mike.looijmans@topic.nl>
Link: https://lore.kernel.org/r/5f393a87-ca8b-4e68-a6f4-a79f75a91ccb@moroto.mountain
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>

authored by

Dan Carpenter and committed by
Jonathan Cameron
debabbb1 8243b287

+1 -1
+1 -1
drivers/iio/adc/ti-ads1298.c
··· 657 657 priv->reg_vref = devm_regulator_get_optional(dev, "vref"); 658 658 if (IS_ERR(priv->reg_vref)) { 659 659 if (PTR_ERR(priv->reg_vref) != -ENODEV) 660 - return dev_err_probe(dev, PTR_ERR(priv->reg_avdd), 660 + return dev_err_probe(dev, PTR_ERR(priv->reg_vref), 661 661 "Failed to get vref regulator\n"); 662 662 663 663 priv->reg_vref = NULL;