lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210301081622.15696-1-dinghao.liu@zju.edu.cn>
Date:   Mon,  1 Mar 2021 16:16:22 +0800
From:   Dinghao Liu <dinghao.liu@....edu.cn>
To:     dinghao.liu@....edu.cn, kjlu@....edu
Cc:     Andy Gross <agross@...nel.org>,
        Bjorn Andersson <bjorn.andersson@...aro.org>,
        Jonathan Cameron <jic23@...nel.org>,
        Lars-Peter Clausen <lars@...afoo.de>,
        Peter Meerwald-Stadler <pmeerw@...erw.net>,
        linux-arm-msm@...r.kernel.org, linux-iio@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: [PATCH] iio: adc: Fix error handling in vadc_do_conversion

There is one vadc_poll_wait_eoc() call in vadc_do_conversion
that we have caught its return value but lack further handling.
Check and jump to err_disable label just like the other
vadc_poll_wait_eoc() in this function.

Signed-off-by: Dinghao Liu <dinghao.liu@....edu.cn>
---
 drivers/iio/adc/qcom-spmi-vadc.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/iio/adc/qcom-spmi-vadc.c b/drivers/iio/adc/qcom-spmi-vadc.c
index 05ff948372b3..fe36b0ba8273 100644
--- a/drivers/iio/adc/qcom-spmi-vadc.c
+++ b/drivers/iio/adc/qcom-spmi-vadc.c
@@ -324,6 +324,8 @@ static int vadc_do_conversion(struct vadc_priv *vadc,
 
 	if (vadc->poll_eoc) {
 		ret = vadc_poll_wait_eoc(vadc, timeout);
+		if (ret)
+			goto err_disable;
 	} else {
 		ret = wait_for_completion_timeout(&vadc->complete, timeout);
 		if (!ret) {
-- 
2.17.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ