diff options
Diffstat (limited to 'drivers/base/dd.c')
-rw-r--r-- | drivers/base/dd.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/base/dd.c b/drivers/base/dd.c index b0088b0efecd..3c503e1f69a2 100644 --- a/drivers/base/dd.c +++ b/drivers/base/dd.c | |||
@@ -296,9 +296,8 @@ static void __device_release_driver(struct device * dev) | |||
296 | { | 296 | { |
297 | struct device_driver * drv; | 297 | struct device_driver * drv; |
298 | 298 | ||
299 | drv = dev->driver; | 299 | drv = get_driver(dev->driver); |
300 | if (drv) { | 300 | if (drv) { |
301 | get_driver(drv); | ||
302 | driver_sysfs_remove(dev); | 301 | driver_sysfs_remove(dev); |
303 | sysfs_remove_link(&dev->kobj, "driver"); | 302 | sysfs_remove_link(&dev->kobj, "driver"); |
304 | klist_remove(&dev->knode_driver); | 303 | klist_remove(&dev->knode_driver); |