Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit bb9947c3 authored by Wei Yongjun's avatar Wei Yongjun Committed by Jonathan Cameron
Browse files

iio: pressure: bmp280: fix wrong pointer passed to PTR_ERR()



PTR_ERR should access the value just tested by IS_ERR, otherwise
the wrong error code will be returned.

Signed-off-by: default avatarWei Yongjun <yongjun_wei@trendmicro.com.cn>
Reviewed-by: default avatarLinus Walleij <linus.walleij@linaro.org>
Signed-off-by: default avatarJonathan Cameron <jic23@kernel.org>
parent 694d0d0b
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -970,7 +970,7 @@ int bmp280_common_probe(struct device *dev,
	data->vdda = devm_regulator_get(dev, "vdda");
	if (IS_ERR(data->vdda)) {
		dev_err(dev, "failed to get VDDA regulator\n");
		ret = PTR_ERR(data->vddd);
		ret = PTR_ERR(data->vdda);
		goto out_disable_vddd;
	}
	ret = regulator_enable(data->vdda);