Thread (3 messages) 3 messages, 2 authors, 2011-12-23

Re: [PATCH 1/1] input: sentelic: Releasing mutex upon register writing failure

flat view

From: Tai-hwa Liang <hidden>
Date: 2011-12-23 01:08:35

On Thu, 22 Dec 2011, Dmitry Torokhov wrote:
Hi Tai-hwa,

On Fri, Dec 16, 2011 at 03:07:54PM +0800, Tai-hwa Liang wrote:
quoted
Making 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 <redacted>
Acked-by: Tai-hwa Liang <redacted>
Since you are actually passing the patch to me there should be your
"Signed-off-by:.. " instead of (or in addtion to) your "Acked-by".

Thanks!
  Sure.  Thank you.

Signed-off-by:	Tai-hwa Liang <redacted>
quoted
---
 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 5babc47..7e96a5d 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)
 	ps2_sendbyte(ps2dev, v, FSP_CMD_TIMEOUT2);

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

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

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

 	if ((v = fsp_test_invert_cmd(reg_val)) != reg_val) {
 		ps2_sendbyte(ps2dev, 0x47, FSP_CMD_TIMEOUT2);
-- 
1.7.7.3
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help