From: Nicolas THERY Date: Tue, 23 Oct 2012 07:47:19 +0000 (-0300) Subject: [media] mem2mem: replace BUG_ON with WARN_ON X-Git-Tag: v3.9-rc5~2^2~745 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3fac4eb374b58e834e54a104cce7d0bdecc863c0;p=platform%2Fupstream%2Fkernel-adaptation-pc.git [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 Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/v4l2-core/v4l2-mem2mem.c b/drivers/media/v4l2-core/v4l2-mem2mem.c index 3ac8358..017fed8 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);