mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-15 00:04:15 +08:00
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: Yi Zhang <yizhang@marvell.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
88513624be
commit
b28e7d5807
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user