media: vicodec: remove WARN_ON(1) from get_q_data()
authorHans Verkuil <hverkuil@xs4all.nl>
Wed, 13 Mar 2019 14:46:42 +0000 (10:46 -0400)
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>
Wed, 20 Mar 2019 09:58:35 +0000 (05:58 -0400)
Some functions like enum_fmt use the buffer type as was passed
from userspace, which might cause the switch to fall into the
default case. Just drop the WARN_ON(1) to avoid kernel log pollution.

Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
drivers/media/platform/vicodec/vicodec-core.c

index d7636fe9e1749641077fe350632df0a2a1780cfe..075927dba61442c24b6ac8359915d6f91b6373eb 100644 (file)
@@ -148,7 +148,6 @@ static struct vicodec_q_data *get_q_data(struct vicodec_ctx *ctx,
        case V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE:
                return &ctx->q_data[V4L2_M2M_DST];
        default:
-               WARN_ON(1);
                break;
        }
        return NULL;