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

Commit 72720ffc authored by Philipp Zabel's avatar Philipp Zabel Committed by Mauro Carvalho Chehab
Browse files

[media] coda: fix error return value if v4l2_m2m_ctx_init fails



Use ret from the outer scope, instead of redefining it in the
conditional clause. That way the error value reaches the end of
the function as intended.

Signed-off-by: default avatarPhilipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent c4eb1bfc
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1484,7 +1484,7 @@ static int coda_open(struct file *file)
	ctx->m2m_ctx = v4l2_m2m_ctx_init(dev->m2m_dev, ctx,
					 &coda_queue_init);
	if (IS_ERR(ctx->m2m_ctx)) {
		int ret = PTR_ERR(ctx->m2m_ctx);
		ret = PTR_ERR(ctx->m2m_ctx);

		v4l2_err(&dev->v4l2_dev, "%s return error (%d)\n",
			 __func__, ret);