* [PATCH TRIVIAL for 3.7] mem2mem: replace BUG_ON with WARN_ON
@ 2012-10-23 8:47 Nicolas THERY
0 siblings, 0 replies; only message in thread
From: Nicolas THERY @ 2012-10-23 8:47 UTC (permalink / raw)
To: linux-media@vger.kernel.org; +Cc: "pawel@osciak.com" <Pawel
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>
---
drivers/media/v4l2-core/v4l2-mem2mem.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
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);
--
1.7.11.3
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2012-10-23 8:47 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-23 8:47 [PATCH TRIVIAL for 3.7] mem2mem: replace BUG_ON with WARN_ON Nicolas THERY
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).