git://ftp.safe.ca
/
safe
/
jmp
/
linux-2.6
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
PM core: rename suspend and resume functions
[safe/jmp/linux-2.6]
/
drivers
/
base
/
driver.c
diff --git
a/drivers/base/driver.c
b/drivers/base/driver.c
index
c51f11b
..
8ae0f63
100644
(file)
--- 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);
}