Skip to content

Commit 92cbf86

Browse files
dmantipovmchehab
authored andcommitted
media: pulse8-cec: handle possible ping error
Handle (and warn about) possible error waiting for MSGCODE_PING result. Found by Linux Verification Center (linuxtesting.org) with SVACE. Signed-off-by: Dmitry Antipov <dmantipov@yandex.ru> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
1 parent 20de9fd commit 92cbf86

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

drivers/media/cec/usb/pulse8/pulse8-cec.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -809,8 +809,11 @@ static void pulse8_ping_eeprom_work_handler(struct work_struct *work)
809809

810810
mutex_lock(&pulse8->lock);
811811
cmd = MSGCODE_PING;
812-
pulse8_send_and_wait(pulse8, &cmd, 1,
813-
MSGCODE_COMMAND_ACCEPTED, 0);
812+
if (pulse8_send_and_wait(pulse8, &cmd, 1,
813+
MSGCODE_COMMAND_ACCEPTED, 0)) {
814+
dev_warn(pulse8->dev, "failed to ping EEPROM\n");
815+
goto unlock;
816+
}
814817

815818
if (pulse8->vers < 2)
816819
goto unlock;

0 commit comments

Comments
 (0)