diff options
author | Philipp Zabel <p.zabel@pengutronix.de> | 2013-05-21 13:31:25 (GMT) |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2013-05-27 12:32:57 (GMT) |
commit | 72720ffc74a58ce27ea237c729f38e6a966f2997 (patch) | |
tree | ee09e36b71dbe028da9a6bda709b4c299f18e3e3 /drivers/media/platform/coda.c | |
parent | c4eb1bfcbd7c2591caecda531072efda9e727dfa (diff) | |
download | linux-72720ffc74a58ce27ea237c729f38e6a966f2997.tar.xz |
[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>
Diffstat (limited to 'drivers/media/platform/coda.c')
-rw-r--r-- | drivers/media/platform/coda.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/platform/coda.c b/drivers/media/platform/coda.c index b1f77d3..aebd172 100644 --- a/drivers/media/platform/coda.c +++ b/drivers/media/platform/coda.c @@ -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); |