summaryrefslogtreecommitdiff
path: root/drivers/media
diff options
context:
space:
mode:
authorDmitry Antipov <dmantipov@yandex.ru>2023-06-06 06:38:15 +0200
committerMauro Carvalho Chehab <mchehab@kernel.org>2023-07-14 09:14:09 +0200
commit92cbf865ea2e0f2997ff97815c6db182eb23df1b (patch)
tree2036ff1c1dfc7c36e14a1d032d161e49f69d1398 /drivers/media
parent20de9fdaf4883deffb0138eef28e9cbbead32cfd (diff)
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>
Diffstat (limited to 'drivers/media')
-rw-r--r--drivers/media/cec/usb/pulse8/pulse8-cec.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/media/cec/usb/pulse8/pulse8-cec.c b/drivers/media/cec/usb/pulse8/pulse8-cec.c
index 04b13cdc38d2..ba67587bd43e 100644
--- a/drivers/media/cec/usb/pulse8/pulse8-cec.c
+++ b/drivers/media/cec/usb/pulse8/pulse8-cec.c
@@ -809,8 +809,11 @@ static void pulse8_ping_eeprom_work_handler(struct work_struct *work)
mutex_lock(&pulse8->lock);
cmd = MSGCODE_PING;
- pulse8_send_and_wait(pulse8, &cmd, 1,
- MSGCODE_COMMAND_ACCEPTED, 0);
+ if (pulse8_send_and_wait(pulse8, &cmd, 1,
+ MSGCODE_COMMAND_ACCEPTED, 0)) {
+ dev_warn(pulse8->dev, "failed to ping EEPROM\n");
+ goto unlock;
+ }
if (pulse8->vers < 2)
goto unlock;