Merge branch 'topic/ctxfi' into for-linus
[pandora-kernel.git] / drivers / input / serio / libps2.c
index 67248c3..be5bbbb 100644 (file)
@@ -210,7 +210,7 @@ int ps2_command(struct ps2dev *ps2dev, unsigned char *param, int command)
        timeout = wait_event_timeout(ps2dev->wait,
                                     !(ps2dev->flags & PS2_FLAG_CMD1), timeout);
 
-       if (ps2dev->cmdcnt && timeout > 0) {
+       if (ps2dev->cmdcnt && !(ps2dev->flags & PS2_FLAG_CMD1)) {
 
                timeout = ps2_adjust_timeout(ps2dev, command, timeout);
                wait_event_timeout(ps2dev->wait,