diff options
author | J. Bruce Fields <bfields@citi.umich.edu> | 2009-06-16 03:08:07 +0200 |
---|---|---|
committer | J. Bruce Fields <bfields@citi.umich.edu> | 2009-06-16 03:08:07 +0200 |
commit | 7eef4091a653c243a87e5375c54504cc03bec4d8 (patch) | |
tree | f65b77f830b2c8f7d014512badfef5df0d591ee9 /drivers/base/driver.c | |
parent | NFSv4: kill off complicated macro 'PROC' (diff) | |
parent | Linux 2.6.30 (diff) | |
download | linux-7eef4091a653c243a87e5375c54504cc03bec4d8.tar.xz linux-7eef4091a653c243a87e5375c54504cc03bec4d8.zip |
Merge commit 'v2.6.30' into for-2.6.31
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); } |