LinuxTV Patchwork vicodec: remove WARN_ON(1) from get_q_data()

login
register
mail settings
Submitter Hans Verkuil
Date March 13, 2019, 2:46 p.m.
Message ID <73d1847a-775e-5d53-4bfb-7933bbec33de@xs4all.nl>
Download mbox | patch
Permalink /patch/55037/
State Accepted
Delegated to: Hans Verkuil
Headers show

Comments

Hans Verkuil - March 13, 2019, 2:46 p.m.
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>
---
 drivers/media/platform/vicodec/vicodec-core.c | 1 -
 1 file changed, 1 deletion(-)

Patch

diff --git a/drivers/media/platform/vicodec/vicodec-core.c b/drivers/media/platform/vicodec/vicodec-core.c
index d7636fe9e174..075927dba614 100644
--- a/drivers/media/platform/vicodec/vicodec-core.c
+++ b/drivers/media/platform/vicodec/vicodec-core.c
@@ -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;

Privacy Policy