diff options
author | Andy Green <andy@openmoko.com> | 2008-11-19 17:09:50 +0000 |
---|---|---|
committer | Andy Green <agreen@pads.home.warmcat.com> | 2008-11-19 17:09:50 +0000 |
commit | cbdda98de3b3d57f22830e7932e52e4358e37a4e (patch) | |
tree | 4b76678aae5a54aa386d3ab9e9dee9bdd8328370 /drivers | |
parent | 65c79ff69dc050ab6b278ef31389fba60facb2db (diff) |
debug-backtrace-not-choke-on-null-dev_blah.patch
Signed-off-by: Andy Green <andy@openmoko.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/base/core.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/base/core.c b/drivers/base/core.c index 8c2cc2648f5..6a06cf0eeba 100644 --- a/drivers/base/core.c +++ b/drivers/base/core.c @@ -55,6 +55,11 @@ static inline int device_is_not_partition(struct device *dev) */ const char *dev_driver_string(const struct device *dev) { + if (!dev) { + printk(KERN_ERR"Null dev to dev_driver_string\n"); + dump_stack(); + return "*NULL*"; + } return dev->driver ? dev->driver->name : (dev->bus ? dev->bus->name : (dev->class ? dev->class->name : "")); |