summaryrefslogtreecommitdiff
path: root/drivers/media
diff options
context:
space:
mode:
authorPeter Seiderer <ps.report@gmx.net>2015-03-24 20:30:48 +0300
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>2015-04-10 16:04:34 +0300
commitd446ec8e122c210a9260f103cbf8da5a56de9c82 (patch)
tree946e57b2ca89d340217bf4d0a0eeb8e593300afb /drivers/media
parenta7f933a56908587e30539d649a9ae808d0601bc5 (diff)
downloadlinux-d446ec8e122c210a9260f103cbf8da5a56de9c82.tar.xz
[media] coda: fix double call to debugfs_remove
In coda_free_aux_buf() call debugfs_remove only if buffer entry is valid (and therfore dentry is valid), double protect by invalidating dentry value. Fixes erroneous prematurely dealloc of debugfs caused by incorrect reference count incrementing. Signed-off-by: Peter Seiderer <ps.report@gmx.net> Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Kamil Debski <k.debski@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'drivers/media')
-rw-r--r--drivers/media/platform/coda/coda-common.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/media/platform/coda/coda-common.c b/drivers/media/platform/coda/coda-common.c
index c82ce562d95a..2906dd225143 100644
--- a/drivers/media/platform/coda/coda-common.c
+++ b/drivers/media/platform/coda/coda-common.c
@@ -1215,8 +1215,9 @@ void coda_free_aux_buf(struct coda_dev *dev,
buf->vaddr, buf->paddr);
buf->vaddr = NULL;
buf->size = 0;
+ debugfs_remove(buf->dentry);
+ buf->dentry = NULL;
}
- debugfs_remove(buf->dentry);
}
static int coda_start_streaming(struct vb2_queue *q, unsigned int count)