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
1 changed files with 0 additions and 1 deletions
|
@ -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 a new issue