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>
This commit is contained in:
Dmitry Antipov 2023-06-06 06:38:15 +02:00 коммит произвёл Mauro Carvalho Chehab
Родитель 20de9fdaf4
Коммит 92cbf865ea
1 изменённых файлов: 5 добавлений и 2 удалений

Просмотреть файл

@ -809,8 +809,11 @@ static void pulse8_ping_eeprom_work_handler(struct work_struct *work)
mutex_lock(&pulse8->lock); mutex_lock(&pulse8->lock);
cmd = MSGCODE_PING; cmd = MSGCODE_PING;
pulse8_send_and_wait(pulse8, &cmd, 1, if (pulse8_send_and_wait(pulse8, &cmd, 1,
MSGCODE_COMMAND_ACCEPTED, 0); MSGCODE_COMMAND_ACCEPTED, 0)) {
dev_warn(pulse8->dev, "failed to ping EEPROM\n");
goto unlock;
}
if (pulse8->vers < 2) if (pulse8->vers < 2)
goto unlock; goto unlock;