From: "Tanislav, Cosmin" <Cosmin.Tanislav@analog.com>
To: Yang Yingliang <yangyingliang@huawei.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-iio@vger.kernel.org" <linux-iio@vger.kernel.org>
Cc: "jic23@kernel.org" <jic23@kernel.org>
Subject: RE: [PATCH -next] iio:accel:adxl367: fix missing unlock on error in adxl367_buffer_predisable()
Date: Thu, 24 Feb 2022 09:38:06 +0000 [thread overview]
Message-ID: <c2a836f26c3246dc93c8ccadb85c5a02@analog.com> (raw)
In-Reply-To: <20220224020302.2177607-1-yangyingliang@huawei.com>
Reviewed-by: Cosmin Tanislav <cosmin.tanislav@analog.com>
> -----Original Message-----
> From: Yang Yingliang <yangyingliang@huawei.com>
> Sent: Thursday, February 24, 2022 4:03 AM
> To: linux-kernel@vger.kernel.org; linux-iio@vger.kernel.org
> Cc: jic23@kernel.org; Tanislav, Cosmin <Cosmin.Tanislav@analog.com>
> Subject: [PATCH -next] iio:accel:adxl367: fix missing unlock on error in
> adxl367_buffer_predisable()
>
> [External]
>
> Add the missing unlock before return from function
> adxl367_buffer_predisable()
> in the error handling case.
>
> Fixes: cbab791c5e2a ("iio: accel: add ADXL367 driver")
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
> ---
> drivers/iio/accel/adxl367.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/iio/accel/adxl367.c b/drivers/iio/accel/adxl367.c
> index b452d74b1d4d..bdc95409abed 100644
> --- a/drivers/iio/accel/adxl367.c
> +++ b/drivers/iio/accel/adxl367.c
> @@ -1359,7 +1359,7 @@ static int adxl367_buffer_predisable(struct iio_dev
> *indio_dev)
>
> ret = adxl367_set_measure_en(st, true);
> if (ret)
> - return ret;
> + goto out;
>
> ret = adxl367_set_temp_adc_mask_en(st, indio_dev-
> >active_scan_mask,
> false);
> --
> 2.25.1
next prev parent reply other threads:[~2022-02-24 9:38 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-24 2:03 [PATCH -next] iio:accel:adxl367: fix missing unlock on error in adxl367_buffer_predisable() Yang Yingliang
2022-02-24 9:38 ` Tanislav, Cosmin [this message]
2022-02-26 18:08 ` Jonathan Cameron
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=c2a836f26c3246dc93c8ccadb85c5a02@analog.com \
--to=cosmin.tanislav@analog.com \
--cc=jic23@kernel.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=yangyingliang@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox