提交 b28e7d58 编写于 作者: Y Yi Zhang 提交者: Greg Kroah-Hartman

staging: android: timed_output: fix use after free of dev

tdev->dev has been freed in device_destroy(), it's not right to
use dev_set_drvdata() after that;
Signed-off-by: NYi Zhang <yizhang@marvell.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 88513624
......@@ -97,7 +97,6 @@ void timed_output_dev_unregister(struct timed_output_dev *tdev)
{
tdev->enable(tdev, 0);
device_destroy(timed_output_class, MKDEV(0, tdev->index));
dev_set_drvdata(tdev->dev, NULL);
}
EXPORT_SYMBOL_GPL(timed_output_dev_unregister);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册