mirror of
https://github.com/torvalds/linux.git
synced 2024-11-01 17:51:43 +00:00
[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: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
This commit is contained in:
parent
c4eb1bfcbd
commit
72720ffc74
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user