mirror of
git://projects.qi-hardware.com/openwrt-xburst.git
synced 2024-12-27 10:22:03 +02:00
fc54b9bf15
(stable-branch of Openmoko) git-svn-id: svn://svn.openwrt.org/openwrt/trunk@13613 3c298f89-4303-0410-b956-a3cf2f4a3e73
30 lines
862 B
Diff
30 lines
862 B
Diff
From 91edf710900c85d081f2f56ad23d85f65674d316 Mon Sep 17 00:00:00 2001
|
|
From: Andy Green <andy@openmoko.com>
|
|
Date: Wed, 2 Jul 2008 22:41:59 +0100
|
|
Subject: [PATCH] debug-backtrace-not-choke-on-null-dev_blah.patch
|
|
|
|
Signed-off-by: Andy Green <andy@openmoko.com>
|
|
---
|
|
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 2683eac..49fdee2 100644
|
|
--- a/drivers/base/core.c
|
|
+++ b/drivers/base/core.c
|
|
@@ -42,6 +42,11 @@ int (*platform_notify_remove)(struct device * dev) = NULL;
|
|
*/
|
|
const char *dev_driver_string(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 : ""));
|
|
--
|
|
1.5.6.5
|
|
|