diff options
author | Tai-hwa Liang <avatar@sentelic.com> | 2011-12-23 04:14:31 -0500 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2011-12-23 04:15:31 -0500 |
commit | d9bae67a7a91a6cc2e7a99d5ae72ada62abcc993 (patch) | |
tree | 767ca89b8f2cf174edcafc6eca2acdded17b5805 /drivers/input/mouse | |
parent | 8521478f67e95ada4e87970c7b41e504c724b2cf (diff) |
Input: sentelic - release mutex upon register write failure
Make sure that mutex is released upon register writing failure.
This fixes boot freezing observed on ARM based OLPC
(http://dev.laptop.org/ticket/11357).
Signed-off-by: Paul Fox <pgf@laptop.org>
Signed-off-by: Tai-hwa Liang <avatar@sentelic.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Diffstat (limited to 'drivers/input/mouse')
-rw-r--r-- | drivers/input/mouse/sentelic.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/input/mouse/sentelic.c b/drivers/input/mouse/sentelic.c index c5b12d2e955a..a2c15e9a8e79 100644 --- a/drivers/input/mouse/sentelic.c +++ b/drivers/input/mouse/sentelic.c | |||
@@ -162,7 +162,7 @@ static int fsp_reg_write(struct psmouse *psmouse, int reg_addr, int reg_val) | |||
162 | ps2_sendbyte(ps2dev, v, FSP_CMD_TIMEOUT2); | 162 | ps2_sendbyte(ps2dev, v, FSP_CMD_TIMEOUT2); |
163 | 163 | ||
164 | if (ps2_sendbyte(ps2dev, 0xf3, FSP_CMD_TIMEOUT) < 0) | 164 | if (ps2_sendbyte(ps2dev, 0xf3, FSP_CMD_TIMEOUT) < 0) |
165 | return -1; | 165 | goto out; |
166 | 166 | ||
167 | if ((v = fsp_test_invert_cmd(reg_val)) != reg_val) { | 167 | if ((v = fsp_test_invert_cmd(reg_val)) != reg_val) { |
168 | /* inversion is required */ | 168 | /* inversion is required */ |
@@ -261,7 +261,7 @@ static int fsp_page_reg_write(struct psmouse *psmouse, int reg_val) | |||
261 | ps2_sendbyte(ps2dev, 0x88, FSP_CMD_TIMEOUT2); | 261 | ps2_sendbyte(ps2dev, 0x88, FSP_CMD_TIMEOUT2); |
262 | 262 | ||
263 | if (ps2_sendbyte(ps2dev, 0xf3, FSP_CMD_TIMEOUT) < 0) | 263 | if (ps2_sendbyte(ps2dev, 0xf3, FSP_CMD_TIMEOUT) < 0) |
264 | return -1; | 264 | goto out; |
265 | 265 | ||
266 | if ((v = fsp_test_invert_cmd(reg_val)) != reg_val) { | 266 | if ((v = fsp_test_invert_cmd(reg_val)) != reg_val) { |
267 | ps2_sendbyte(ps2dev, 0x47, FSP_CMD_TIMEOUT2); | 267 | ps2_sendbyte(ps2dev, 0x47, FSP_CMD_TIMEOUT2); |