aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/base/dd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/base/dd.c b/drivers/base/dd.c
index 730a9ce0a14a..889c71111239 100644
--- a/drivers/base/dd.c
+++ b/drivers/base/dd.c
@@ -209,7 +209,7 @@ static void __device_release_driver(struct device * dev)
209 sysfs_remove_link(&dev->kobj, "driver"); 209 sysfs_remove_link(&dev->kobj, "driver");
210 klist_remove(&dev->knode_driver); 210 klist_remove(&dev->knode_driver);
211 211
212 if (dev->bus->remove) 212 if (dev->bus && dev->bus->remove)
213 dev->bus->remove(dev); 213 dev->bus->remove(dev);
214 else if (drv->remove) 214 else if (drv->remove)
215 drv->remove(dev); 215 drv->remove(dev);