Commit d9bae67a authored by Tai-hwa Liang's avatar Tai-hwa Liang Committed by Dmitry Torokhov

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: default avatarPaul Fox <pgf@laptop.org>
Signed-off-by: default avatarTai-hwa Liang <avatar@sentelic.com>
Signed-off-by: default avatarDmitry Torokhov <dtor@mail.ru>
parent 8521478f
...@@ -162,7 +162,7 @@ static int fsp_reg_write(struct psmouse *psmouse, int reg_addr, int reg_val) ...@@ -162,7 +162,7 @@ static int fsp_reg_write(struct psmouse *psmouse, int reg_addr, int reg_val)
ps2_sendbyte(ps2dev, v, FSP_CMD_TIMEOUT2); ps2_sendbyte(ps2dev, v, FSP_CMD_TIMEOUT2);
if (ps2_sendbyte(ps2dev, 0xf3, FSP_CMD_TIMEOUT) < 0) if (ps2_sendbyte(ps2dev, 0xf3, FSP_CMD_TIMEOUT) < 0)
return -1; goto out;
if ((v = fsp_test_invert_cmd(reg_val)) != reg_val) { if ((v = fsp_test_invert_cmd(reg_val)) != reg_val) {
/* inversion is required */ /* inversion is required */
...@@ -261,7 +261,7 @@ static int fsp_page_reg_write(struct psmouse *psmouse, int reg_val) ...@@ -261,7 +261,7 @@ static int fsp_page_reg_write(struct psmouse *psmouse, int reg_val)
ps2_sendbyte(ps2dev, 0x88, FSP_CMD_TIMEOUT2); ps2_sendbyte(ps2dev, 0x88, FSP_CMD_TIMEOUT2);
if (ps2_sendbyte(ps2dev, 0xf3, FSP_CMD_TIMEOUT) < 0) if (ps2_sendbyte(ps2dev, 0xf3, FSP_CMD_TIMEOUT) < 0)
return -1; goto out;
if ((v = fsp_test_invert_cmd(reg_val)) != reg_val) { if ((v = fsp_test_invert_cmd(reg_val)) != reg_val) {
ps2_sendbyte(ps2dev, 0x47, FSP_CMD_TIMEOUT2); ps2_sendbyte(ps2dev, 0x47, FSP_CMD_TIMEOUT2);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment