From: Philipp Zabel
Date: Fri, 23 Jan 2015 16:51:17 +0000 (-0300)
Subject: [media] coda: remove context debugfs entry last
X-Git-Tag: firefly_0821_release~176^2~795^2~1550
X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=e1519e866b73ff49aaf017d8ac08eb96944ff191;p=firefly-linux-kernel-4.4.55.git
[media] coda: remove context debugfs entry last
Do not remove the per-context debugfs directory before the
per-buffer debugfs entries contained therein.
Signed-off-by: Philipp Zabel
Signed-off-by: Kamil Debski
Signed-off-by: Mauro Carvalho Chehab
---
diff --git a/drivers/media/platform/coda/coda-common.c b/drivers/media/platform/coda/coda-common.c
index ea7a0dcf1530..8b4bd88af290 100644
--- a/drivers/media/platform/coda/coda-common.c
+++ b/drivers/media/platform/coda/coda-common.c
@@ -1693,8 +1693,6 @@ static int coda_release(struct file *file)
v4l2_dbg(1, coda_debug, &dev->v4l2_dev, "Releasing instance %p\n",
ctx);
- debugfs_remove_recursive(ctx->debugfs_entry);
-
if (ctx->inst_type == CODA_INST_DECODER)
coda_bit_stream_end_flag(ctx);
@@ -1728,6 +1726,7 @@ static int coda_release(struct file *file)
clear_bit(ctx->idx, &dev->instance_mask);
if (ctx->ops->release)
ctx->ops->release(ctx);
+ debugfs_remove_recursive(ctx->debugfs_entry);
kfree(ctx);
return 0;