aboutsummaryrefslogtreecommitdiff
path: root/drivers/base/driver.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/base/driver.c')
-rw-r--r--drivers/base/driver.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/base/driver.c b/drivers/base/driver.c
index 1e2bda780e4..2889ad57e48 100644
--- a/drivers/base/driver.c
+++ b/drivers/base/driver.c
@@ -216,6 +216,8 @@ int driver_register(struct device_driver *drv)
int ret;
struct device_driver *other;
+ BUG_ON(!drv->bus->p);
+
if ((drv->bus->probe && drv->probe) ||
(drv->bus->remove && drv->remove) ||
(drv->bus->shutdown && drv->shutdown))