[PATCH] backlight: lp855x_bl: Add missing mutex_unlock inlp855x_read_byte error path

From: Axel Lin
Date: Wed Feb 01 2012 - 05:38:57 EST


Signed-off-by: Axel Lin <axel.lin@xxxxxxxxx>
---
drivers/video/backlight/lp855x_bl.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/video/backlight/lp855x_bl.c b/drivers/video/backlight/lp855x_bl.c
index 8f628b8..8bd0d75 100644
--- a/drivers/video/backlight/lp855x_bl.c
+++ b/drivers/video/backlight/lp855x_bl.c
@@ -41,6 +41,7 @@ static int lp855x_read_byte(struct lp855x *lp, u8 reg, u8 *data)
mutex_lock(&lp->xfer_lock);
ret = i2c_smbus_read_byte_data(lp->client, reg);
if (ret < 0) {
+ mutex_unlock(&lp->xfer_lock);
dev_err(lp->dev, "failed to read 0x%.2x\n", reg);
return ret;
}
--
1.7.5.4



--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/