diff options
author | David Woodhouse <David.Woodhouse@intel.com> | 2009-06-08 12:21:27 +0100 |
---|---|---|
committer | David Woodhouse <David.Woodhouse@intel.com> | 2009-06-08 12:21:27 +0100 |
commit | e635a01ea0a16cf7cd31ecd2305870385dca9be6 (patch) | |
tree | c7153e7dee5caf6ac90d85694ff27e4d0b606290 /drivers/base/driver.c | |
parent | 143070e74630b9557e1bb64d899ff2cc5a1dcb48 (diff) | |
parent | 947391cfbaa3b08558844c0b187bcd0223c3f660 (diff) |
Merge branch 'next-mtd' of git://aeryn.fluff.org.uk/bjdooks/linux
Diffstat (limited to 'drivers/base/driver.c')
-rw-r--r-- | drivers/base/driver.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/base/driver.c b/drivers/base/driver.c index c51f11bb29ae..8ae0f63602e0 100644 --- a/drivers/base/driver.c +++ b/drivers/base/driver.c @@ -257,6 +257,10 @@ EXPORT_SYMBOL_GPL(driver_register); */ void driver_unregister(struct device_driver *drv) { + if (!drv || !drv->p) { + WARN(1, "Unexpected driver unregister!\n"); + return; + } driver_remove_groups(drv, drv->groups); bus_remove_driver(drv); } |