* [PATCH next] iio: dac: ad5592r: Delete stray unlock in ad5592r_write_raw()
@ 2025-04-16 11:09 Dan Carpenter
2025-04-16 11:26 ` Andy Shevchenko
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Dan Carpenter @ 2025-04-16 11:09 UTC (permalink / raw)
To: Bartosz Golaszewski
Cc: Lars-Peter Clausen, Michael Hennerich, Jonathan Cameron,
David Lechner, Nuno Sá, Andy Shevchenko, linux-iio,
linux-kernel, kernel-janitors
This code was converted to use guard locks but one of the unlocks was
accidentally overlooked. Delete it.
Fixes: f8fedb167ba4 ("iio: dac: ad5592r: use lock guards")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
---
drivers/iio/dac/ad5592r-base.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/iio/dac/ad5592r-base.c b/drivers/iio/dac/ad5592r-base.c
index 217a8a88818d..5f2cd51723f6 100644
--- a/drivers/iio/dac/ad5592r-base.c
+++ b/drivers/iio/dac/ad5592r-base.c
@@ -324,10 +324,8 @@ static int ad5592r_write_raw(struct iio_dev *iio_dev,
ret = st->ops->reg_read(st, AD5592R_REG_CTRL,
&st->cached_gp_ctrl);
- if (ret < 0) {
- mutex_unlock(&st->lock);
+ if (ret < 0)
return ret;
- }
if (chan->output) {
if (gain)
--
2.47.2
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH next] iio: dac: ad5592r: Delete stray unlock in ad5592r_write_raw()
2025-04-16 11:09 [PATCH next] iio: dac: ad5592r: Delete stray unlock in ad5592r_write_raw() Dan Carpenter
@ 2025-04-16 11:26 ` Andy Shevchenko
2025-04-16 13:19 ` Nuno Sá
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Andy Shevchenko @ 2025-04-16 11:26 UTC (permalink / raw)
To: Dan Carpenter
Cc: Bartosz Golaszewski, Lars-Peter Clausen, Michael Hennerich,
Jonathan Cameron, David Lechner, Nuno Sá, linux-iio,
linux-kernel, kernel-janitors
On Wed, Apr 16, 2025 at 02:09:33PM +0300, Dan Carpenter wrote:
> This code was converted to use guard locks but one of the unlocks was
> accidentally overlooked. Delete it.
Yeah, looks like missed one.
Reviewed-by: Andy Shevchenko <andy@kernel.org>
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH next] iio: dac: ad5592r: Delete stray unlock in ad5592r_write_raw()
2025-04-16 11:09 [PATCH next] iio: dac: ad5592r: Delete stray unlock in ad5592r_write_raw() Dan Carpenter
2025-04-16 11:26 ` Andy Shevchenko
@ 2025-04-16 13:19 ` Nuno Sá
2025-04-16 14:12 ` Bartosz Golaszewski
2025-04-18 16:03 ` Jonathan Cameron
3 siblings, 0 replies; 5+ messages in thread
From: Nuno Sá @ 2025-04-16 13:19 UTC (permalink / raw)
To: Dan Carpenter, Bartosz Golaszewski
Cc: Lars-Peter Clausen, Michael Hennerich, Jonathan Cameron,
David Lechner, Nuno Sá, Andy Shevchenko, linux-iio,
linux-kernel, kernel-janitors
On Wed, 2025-04-16 at 14:09 +0300, Dan Carpenter wrote:
> This code was converted to use guard locks but one of the unlocks was
> accidentally overlooked. Delete it.
>
> Fixes: f8fedb167ba4 ("iio: dac: ad5592r: use lock guards")
> Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
> ---
Reviewed-by: Nuno Sá <nuno.sa@analog.com>
Thx!
- Nuno Sá
> drivers/iio/dac/ad5592r-base.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/iio/dac/ad5592r-base.c b/drivers/iio/dac/ad5592r-base.c
> index 217a8a88818d..5f2cd51723f6 100644
> --- a/drivers/iio/dac/ad5592r-base.c
> +++ b/drivers/iio/dac/ad5592r-base.c
> @@ -324,10 +324,8 @@ static int ad5592r_write_raw(struct iio_dev *iio_dev,
>
> ret = st->ops->reg_read(st, AD5592R_REG_CTRL,
> &st->cached_gp_ctrl);
> - if (ret < 0) {
> - mutex_unlock(&st->lock);
> + if (ret < 0)
> return ret;
> - }
>
> if (chan->output) {
> if (gain)
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH next] iio: dac: ad5592r: Delete stray unlock in ad5592r_write_raw()
2025-04-16 11:09 [PATCH next] iio: dac: ad5592r: Delete stray unlock in ad5592r_write_raw() Dan Carpenter
2025-04-16 11:26 ` Andy Shevchenko
2025-04-16 13:19 ` Nuno Sá
@ 2025-04-16 14:12 ` Bartosz Golaszewski
2025-04-18 16:03 ` Jonathan Cameron
3 siblings, 0 replies; 5+ messages in thread
From: Bartosz Golaszewski @ 2025-04-16 14:12 UTC (permalink / raw)
To: Dan Carpenter
Cc: Lars-Peter Clausen, Michael Hennerich, Jonathan Cameron,
David Lechner, Nuno Sá, Andy Shevchenko, linux-iio,
linux-kernel, kernel-janitors
On Wed, 16 Apr 2025 at 13:09, Dan Carpenter <dan.carpenter@linaro.org> wrote:
>
> This code was converted to use guard locks but one of the unlocks was
> accidentally overlooked. Delete it.
>
> Fixes: f8fedb167ba4 ("iio: dac: ad5592r: use lock guards")
> Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
> ---
> drivers/iio/dac/ad5592r-base.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/iio/dac/ad5592r-base.c b/drivers/iio/dac/ad5592r-base.c
> index 217a8a88818d..5f2cd51723f6 100644
> --- a/drivers/iio/dac/ad5592r-base.c
> +++ b/drivers/iio/dac/ad5592r-base.c
> @@ -324,10 +324,8 @@ static int ad5592r_write_raw(struct iio_dev *iio_dev,
>
> ret = st->ops->reg_read(st, AD5592R_REG_CTRL,
> &st->cached_gp_ctrl);
> - if (ret < 0) {
> - mutex_unlock(&st->lock);
> + if (ret < 0)
> return ret;
> - }
>
> if (chan->output) {
> if (gain)
> --
> 2.47.2
>
Reviewed-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Thanks for spotting it.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH next] iio: dac: ad5592r: Delete stray unlock in ad5592r_write_raw()
2025-04-16 11:09 [PATCH next] iio: dac: ad5592r: Delete stray unlock in ad5592r_write_raw() Dan Carpenter
` (2 preceding siblings ...)
2025-04-16 14:12 ` Bartosz Golaszewski
@ 2025-04-18 16:03 ` Jonathan Cameron
3 siblings, 0 replies; 5+ messages in thread
From: Jonathan Cameron @ 2025-04-18 16:03 UTC (permalink / raw)
To: Dan Carpenter
Cc: Bartosz Golaszewski, Lars-Peter Clausen, Michael Hennerich,
David Lechner, Nuno Sá, Andy Shevchenko, linux-iio,
linux-kernel, kernel-janitors
On Wed, 16 Apr 2025 14:09:33 +0300
Dan Carpenter <dan.carpenter@linaro.org> wrote:
> This code was converted to use guard locks but one of the unlocks was
> accidentally overlooked. Delete it.
>
> Fixes: f8fedb167ba4 ("iio: dac: ad5592r: use lock guards")
> Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Applied. Thanks.
> ---
> drivers/iio/dac/ad5592r-base.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/iio/dac/ad5592r-base.c b/drivers/iio/dac/ad5592r-base.c
> index 217a8a88818d..5f2cd51723f6 100644
> --- a/drivers/iio/dac/ad5592r-base.c
> +++ b/drivers/iio/dac/ad5592r-base.c
> @@ -324,10 +324,8 @@ static int ad5592r_write_raw(struct iio_dev *iio_dev,
>
> ret = st->ops->reg_read(st, AD5592R_REG_CTRL,
> &st->cached_gp_ctrl);
> - if (ret < 0) {
> - mutex_unlock(&st->lock);
> + if (ret < 0)
> return ret;
> - }
>
> if (chan->output) {
> if (gain)
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2025-04-18 16:03 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-16 11:09 [PATCH next] iio: dac: ad5592r: Delete stray unlock in ad5592r_write_raw() Dan Carpenter
2025-04-16 11:26 ` Andy Shevchenko
2025-04-16 13:19 ` Nuno Sá
2025-04-16 14:12 ` Bartosz Golaszewski
2025-04-18 16:03 ` Jonathan Cameron
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox