Commit 1f5681aa authored by Stefan Richter's avatar Stefan Richter Committed by Greg Kroah-Hartman

driver core: properly get driver in device_release_driver

Signed-off-by: default avatarStefan Richter <stefanr@s5r6.in-berlin.de>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent f8916c11
...@@ -296,9 +296,8 @@ static void __device_release_driver(struct device * dev) ...@@ -296,9 +296,8 @@ static void __device_release_driver(struct device * dev)
{ {
struct device_driver * drv; struct device_driver * drv;
drv = dev->driver; drv = get_driver(dev->driver);
if (drv) { if (drv) {
get_driver(drv);
driver_sysfs_remove(dev); driver_sysfs_remove(dev);
sysfs_remove_link(&dev->kobj, "driver"); sysfs_remove_link(&dev->kobj, "driver");
klist_remove(&dev->knode_driver); klist_remove(&dev->knode_driver);
......
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