iio: dac: ad5592r: Delete stray unlock in ad5592r_write_raw()
Subsystems (3)
PATCH 1/1 iio: dac: ad5592r: Delete stray unlock in ad5592r_write_raw()
This code was converted to use guard locks but one of the unlocks was accidentally overlooked. Delete it.
--- drivers/iio/dac/ad5592r-base.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/iio/dac/ad5592r-base.c +1 -3
@@ -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)
Signature · 1 line
2.47.2
Quoted 2 lines · Dan Carpenter
This code was converted to use guard locks but one of the unlocks was accidentally overlooked. Delete it.
Yeah, looks like missed one.
Signature · 2 lines
With Best Regards, Andy Shevchenko
Quoted 6 lines · Dan Carpenter
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 <[email protected]>---
Thx!
- Nuno Sá
Quoted 19 lines
drivers/iio/dac/ad5592r-base.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)drivers/iio/dac/ad5592r-base.c +0
-0@@ -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);drivers/iio/dac/ad5592r-base.c +1
-2-if (ret <0 ) { -mutex_unlock (&st->lock); +if (ret <0 )return ret;
drivers/iio/dac/ad5592r-base.c +0
-1- }
if (chan->output) {
if (gain)
Quoted 27 lines · Dan Carpenter
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 <[email protected]>--- drivers/iio/dac/ad5592r-base.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)drivers/iio/dac/ad5592r-base.c +1
-4@@ -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) --
Quoted 2 lines
2.47.2
Thanks for spotting it.
Quoted 5 lines · On Wed, 16 Apr 2025 14:09:33 +0300 Dan Carpenter <[email protected]>…
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 <[email protected]>
Applied. Thanks.
Quoted 20 lines
--- drivers/iio/dac/ad5592r-base.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)drivers/iio/dac/ad5592r-base.c +1
-3@@ -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)