Skip to content

Commit

Permalink
extcon: arizona: unlock mutex on error path in arizona_micdet()
Browse files Browse the repository at this point in the history
If regmap_read() failed, arizona_micdet() returns IRQ_NONE
leaving &info->lock mutex locked as opposed to all other return paths.

Found by Linux Driver Verification project (linuxtesting.org).

Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: Myungjoo Ham <myungjoo.ham@samsung.com>
  • Loading branch information
Alexey Khoroshilov authored and Chanwoo Choi committed Nov 20, 2012
1 parent f4a75d2 commit be31cc0
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/extcon/extcon-arizona.c
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,7 @@ static irqreturn_t arizona_micdet(int irq, void *data)
ret = regmap_read(arizona->regmap, ARIZONA_MIC_DETECT_3, &val);
if (ret != 0) {
dev_err(arizona->dev, "Failed to read MICDET: %d\n", ret);
mutex_unlock(&info->lock);
return IRQ_NONE;
}

Expand Down

0 comments on commit be31cc0

Please sign in to comment.