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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230924181906.16797c9b@jic23-huawei>
Date:   Sun, 24 Sep 2023 18:19:06 +0100
From:   Jonathan Cameron <jic23@...nel.org>
To:     David Lechner <dlechner@...libre.com>
Cc:     linux-iio@...r.kernel.org, devicetree@...r.kernel.org,
        linux-staging@...ts.linux.dev, linux-kernel@...r.kernel.org,
        Rob Herring <robh+dt@...nel.org>,
        Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
        Conor Dooley <conor+dt@...nel.org>,
        Michael Hennerich <Michael.Hennerich@...log.com>,
        Nuno Sá <nuno.sa@...log.com>,
        Axel Haslam <ahaslam@...libre.com>,
        Philip Molloy <pmolloy@...libre.com>
Subject: Re: [PATCH v2 04/19] staging: iio: resolver: ad2s1210: fix not
 restoring sample gpio in channel read

On Thu, 21 Sep 2023 09:43:45 -0500
David Lechner <dlechner@...libre.com> wrote:

> In theory, this code path should not be reachable because of the
> previous switch statement. But just in case we should make sure we
> are restoring the SAMPLE gpio to its original state before returning
> in addition to releasing the mutex lock.
> 
> Signed-off-by: David Lechner <dlechner@...libre.com>
Applied to the togreg branch of iio.git and pushed out as testing
for all the normal reasons.

Thanks,

Jonathan

> ---
>  drivers/staging/iio/resolver/ad2s1210.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/staging/iio/resolver/ad2s1210.c b/drivers/staging/iio/resolver/ad2s1210.c
> index 84743e31261a..0bdd5a30d45d 100644
> --- a/drivers/staging/iio/resolver/ad2s1210.c
> +++ b/drivers/staging/iio/resolver/ad2s1210.c
> @@ -510,8 +510,8 @@ static int ad2s1210_read_raw(struct iio_dev *indio_dev,
>  		ret = IIO_VAL_INT;
>  		break;
>  	default:
> -		mutex_unlock(&st->lock);
> -		return -EINVAL;
> +		ret = -EINVAL;
> +		break;
>  	}
>  
>  error_ret:

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ