Skip to content

Commit d9bae67

Browse files
Tai-hwa Liangdtor
authored andcommitted
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 <[email protected]> Signed-off-by: Tai-hwa Liang <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
1 parent 8521478 commit d9bae67

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/input/mouse/sentelic.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ static int fsp_reg_write(struct psmouse *psmouse, int reg_addr, int reg_val)
162162
ps2_sendbyte(ps2dev, v, FSP_CMD_TIMEOUT2);
163163

164164
if (ps2_sendbyte(ps2dev, 0xf3, FSP_CMD_TIMEOUT) < 0)
165-
return -1;
165+
goto out;
166166

167167
if ((v = fsp_test_invert_cmd(reg_val)) != reg_val) {
168168
/* inversion is required */
@@ -261,7 +261,7 @@ static int fsp_page_reg_write(struct psmouse *psmouse, int reg_val)
261261
ps2_sendbyte(ps2dev, 0x88, FSP_CMD_TIMEOUT2);
262262

263263
if (ps2_sendbyte(ps2dev, 0xf3, FSP_CMD_TIMEOUT) < 0)
264-
return -1;
264+
goto out;
265265

266266
if ((v = fsp_test_invert_cmd(reg_val)) != reg_val) {
267267
ps2_sendbyte(ps2dev, 0x47, FSP_CMD_TIMEOUT2);

0 commit comments

Comments
 (0)