projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c56d34a
)
[media] drivers/media/media-devnode: clear private_data before put_device()
author
Max Kellermann
<max@duempel.org>
Mon, 21 Mar 2016 13:30:28 +0000
(10:30 -0300)
committer
Mauro Carvalho Chehab
<mchehab@osg.samsung.com>
Sat, 7 May 2016 14:43:53 +0000
(11:43 -0300)
Callbacks invoked from put_device() may free the struct media_devnode
pointer, so any cleanup needs to be done before put_device().
Signed-off-by: Max Kellermann <max@duempel.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
drivers/media/media-devnode.c
patch
|
blob
|
history
diff --git
a/drivers/media/media-devnode.c
b/drivers/media/media-devnode.c
index
64a4b1e
..
b66dc9d
100644
(file)
--- a/
drivers/media/media-devnode.c
+++ b/
drivers/media/media-devnode.c
@@
-197,10
+197,11
@@
static int media_release(struct inode *inode, struct file *filp)
if (mdev->fops->release)
mdev->fops->release(filp);
+ filp->private_data = NULL;
+
/* decrease the refcount unconditionally since the release()
return value is ignored. */
put_device(&mdev->dev);
- filp->private_data = NULL;
return 0;
}