Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3fac4eb3 authored by Nicolas THERY's avatar Nicolas THERY Committed by Mauro Carvalho Chehab
Browse files

[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: default avatarNicolas Thery <nicolas.thery@st.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent 2e74598d
Loading
Loading
Loading
Loading
+2 −4
Original line number Original line Diff line number Diff line
@@ -510,12 +510,10 @@ struct v4l2_m2m_dev *v4l2_m2m_init(struct v4l2_m2m_ops *m2m_ops)
{
{
	struct v4l2_m2m_dev *m2m_dev;
	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);
		return ERR_PTR(-EINVAL);


	BUG_ON(!m2m_ops->device_run);
	BUG_ON(!m2m_ops->job_abort);

	m2m_dev = kzalloc(sizeof *m2m_dev, GFP_KERNEL);
	m2m_dev = kzalloc(sizeof *m2m_dev, GFP_KERNEL);
	if (!m2m_dev)
	if (!m2m_dev)
		return ERR_PTR(-ENOMEM);
		return ERR_PTR(-ENOMEM);