media: allegro: print warning if channel creation timeout occurs

This message can be helpful for troubleshooting and there is already a
corresponding message in case of a channel destroy timeout.
Add a similar message for channel creation.

Signed-off-by: Matthias Fend <matthias.fend@emfend.at>
Reviewed-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
Signed-off-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
This commit is contained in:
Matthias Fend
2025-09-01 17:13:36 +02:00
committed by Hans Verkuil
parent 2ce45197be
commit 277f507fb1

View File

@@ -2602,8 +2602,14 @@ static int allegro_create_channel(struct allegro_channel *channel)
allegro_mcu_send_create_channel(dev, channel);
time_left = wait_for_completion_timeout(&channel->completion,
msecs_to_jiffies(5000));
if (time_left == 0)
if (time_left == 0) {
v4l2_warn(&dev->v4l2_dev,
"user %d: timeout while creating channel\n",
channel->user_id);
channel->error = -ETIMEDOUT;
}
if (channel->error)
goto err;