Commit b28e7d58 authored by Yi Zhang's avatar Yi Zhang Committed by Greg Kroah-Hartman
Browse files

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: default avatarYi Zhang <yizhang@marvell.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 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% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment