summaryrefslogtreecommitdiffstats
path: root/drivers/media/v4l2-core
diff options
context:
space:
mode:
authorNicolas THERY <nicolas.thery@st.com>2012-10-23 09:47:19 +0200
committerMauro Carvalho Chehab <mchehab@redhat.com>2012-10-28 21:45:03 +0100
commit3fac4eb374b58e834e54a104cce7d0bdecc863c0 (patch)
tree960b0d96c45293a881000679747cc8e93e411ed7 /drivers/media/v4l2-core
parent[media] v4l2: Fix typo in struct v4l2_captureparm description (diff)
downloadlinux-3fac4eb374b58e834e54a104cce7d0bdecc863c0.tar.xz
linux-3fac4eb374b58e834e54a104cce7d0bdecc863c0.zip
[media] mem2mem: replace BUG_ON with WARN_ON
See following thread for rationale: http://www.spinics.net/lists/linux-media/msg52462.html Tested by compilation only. Signed-off-by: Nicolas Thery <nicolas.thery@st.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/v4l2-core')
-rw-r--r--drivers/media/v4l2-core/v4l2-mem2mem.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/media/v4l2-core/v4l2-mem2mem.c b/drivers/media/v4l2-core/v4l2-mem2mem.c
index 3ac83583ad7a..017fed8ad2ab 100644
--- a/drivers/media/v4l2-core/v4l2-mem2mem.c
+++ b/drivers/media/v4l2-core/v4l2-mem2mem.c
@@ -510,12 +510,10 @@ struct v4l2_m2m_dev *v4l2_m2m_init(struct v4l2_m2m_ops *m2m_ops)
{
struct v4l2_m2m_dev *m2m_dev;
- if (!m2m_ops)
+ if (!m2m_ops || WARN_ON(!m2m_ops->device_run) ||
+ WARN_ON(!m2m_ops->job_abort))
return ERR_PTR(-EINVAL);
- BUG_ON(!m2m_ops->device_run);
- BUG_ON(!m2m_ops->job_abort);
-
m2m_dev = kzalloc(sizeof *m2m_dev, GFP_KERNEL);
if (!m2m_dev)
return ERR_PTR(-ENOMEM);