media: cec-pin: fix broken tx_ignore_nack_until_eom error injection
authorHans Verkuil <hverkuil@xs4all.nl>
Wed, 14 Nov 2018 08:37:53 +0000 (03:37 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 9 Jan 2019 16:38:46 +0000 (17:38 +0100)
commit2f8cff22960b4b41e8aac2063f931c10d44fdc6c
tree42bc2cc64bc95e1612e1e2e7714ea0ddf0b4e2d6
parent465153038583876e436cd371e4d36e6c8601e671
media: cec-pin: fix broken tx_ignore_nack_until_eom error injection

commit ac791f19a273a7fe254a7596f193af6534582a9f upstream.

If the tx_ignore_nack_until_eom error injection was activated,
then tx_nacked was never set instead of setting it when the last
byte of the message was transmitted.

As a result the transmit was marked as OK, when it should have
been NACKed.

Modify the condition so that it always sets tx_nacked when the
last byte of the message was transmitted.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Cc: <stable@vger.kernel.org> # for v4.17 and up
Signed-off-by: Hans Verkuil <hansverk@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/media/cec/cec-pin.c