diff options
| author | 2009-06-11 09:01:14 +0300 | |
|---|---|---|
| committer | 2009-06-11 09:01:14 +0300 | |
| commit | cf9fe114e3b37e14fc8434d5abb192e35df551b1 (patch) | |
| tree | 0f82879295dc792f9df1a3ce79e143a3c073510f /drivers/base/driver.c | |
| parent | sh: plug vsyscall dir in to archclean. (diff) | |
| parent | Merge branch 'tracing-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip (diff) | |
| download | wireguard-linux-cf9fe114e3b37e14fc8434d5abb192e35df551b1.tar.xz wireguard-linux-cf9fe114e3b37e14fc8434d5abb192e35df551b1.zip | |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
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); } |
