From: Michael Tretter Date: Mon, 16 Mar 2020 15:26:22 +0000 (+0100) Subject: media: allegro: fail encoding only on actual errors X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=b646f99642b7499b469eaff25829a0b91a69692a;p=openwrt%2Fstaging%2Fblogic.git media: allegro: fail encoding only on actual errors Only negative values are actual errors and positive values are used for warnings. Warnings should not fail the encoding process. Signed-off-by: Michael Tretter Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/staging/media/allegro-dvt/allegro-core.c b/drivers/staging/media/allegro-dvt/allegro-core.c index 9e601a602ac9..56d199c9312e 100644 --- a/drivers/staging/media/allegro-dvt/allegro-core.c +++ b/drivers/staging/media/allegro-dvt/allegro-core.c @@ -1536,7 +1536,7 @@ static void allegro_channel_finish_frame(struct allegro_channel *channel, dst_buf = v4l2_m2m_dst_buf_remove(channel->fh.m2m_ctx); dst_buf->sequence = channel->csequence++; - if (msg->error_code) { + if (msg->error_code & AL_ERROR) { v4l2_err(&dev->v4l2_dev, "channel %d: failed to encode frame: %s (%x)\n", channel->mcu_channel_id,