diff --git a/drivers/base/dd.c b/drivers/base/dd.c index b0088b0efecdd1e5395e4104d23d0fe34dbb9a0d..3c503e1f69a2b4051390427292ebb7559f17cd9b 100644 --- a/drivers/base/dd.c +++ b/drivers/base/dd.c @@ -296,9 +296,8 @@ static void __device_release_driver(struct device * dev) { struct device_driver * drv; - drv = dev->driver; + drv = get_driver(dev->driver); if (drv) { - get_driver(drv); driver_sysfs_remove(dev); sysfs_remove_link(&dev->kobj, "driver"); klist_remove(&dev->knode_driver);