projects
/
GitHub
/
LineageOS
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
acc37e8
)
[media] drivers/media/rc: postpone kfree(rc_dev)
author
Max Kellermann
<max@duempel.org>
Mon, 21 Mar 2016 11:33:05 +0000
(08:33 -0300)
committer
Mauro Carvalho Chehab
<mchehab@osg.samsung.com>
Sat, 7 May 2016 14:21:04 +0000
(11:21 -0300)
CONFIG_DEBUG_KOBJECT_RELEASE found this bug.
Signed-off-by: Max Kellermann <max@duempel.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
drivers/media/rc/rc-main.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/media/rc/rc-main.c
b/drivers/media/rc/rc-main.c
index 68541b1e3bcba12e3720f0a6e043a3fecb415ee2..7dfc7c2188f0fc6e7b0a9db6e64f1d7900556caf 100644
(file)
--- a/
drivers/media/rc/rc-main.c
+++ b/
drivers/media/rc/rc-main.c
@@
-1263,6
+1263,9
@@
unlock:
static void rc_dev_release(struct device *device)
{
+ struct rc_dev *dev = to_rc_dev(device);
+
+ kfree(dev);
}
#define ADD_HOTPLUG_VAR(fmt, val...) \
@@
-1384,7
+1387,9
@@
void rc_free_device(struct rc_dev *dev)
put_device(&dev->dev);
- kfree(dev);
+ /* kfree(dev) will be called by the callback function
+ rc_dev_release() */
+
module_put(THIS_MODULE);
}
EXPORT_SYMBOL_GPL(rc_free_device);