Skip to content

Commit 1db0fd2

Browse files
committed
Input: libps2 - fix NAK handling
Do not try to process "resend" or "reject" responses from the device as normal response data for a command. Reviewed-by: Raul E Rangel <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Dmitry Torokhov <[email protected]>
1 parent df9fe0e commit 1db0fd2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/input/serio/libps2.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -445,7 +445,7 @@ bool ps2_handle_ack(struct ps2dev *ps2dev, u8 data)
445445
ps2dev->flags &= ~PS2_FLAG_ACK;
446446
wake_up(&ps2dev->wait);
447447

448-
if (data != PS2_RET_ACK)
448+
if (!ps2dev->nak && data != PS2_RET_ACK)
449449
ps2_handle_response(ps2dev, data);
450450

451451
return true;

0 commit comments

Comments
 (0)