mirror of
				git://git.openwrt.org/openwrt/openwrt.git
				synced 2025-10-30 21:44:27 -04:00 
			
		
		
		
	
		
			
				
	
	
		
			30 lines
		
	
	
		
			866 B
		
	
	
	
		
			Diff
		
	
	
		
			Executable File
		
	
	
	
	
			
		
		
	
	
			30 lines
		
	
	
		
			866 B
		
	
	
	
		
			Diff
		
	
	
		
			Executable File
		
	
	
	
	
| From b0c1e8a5a319e506d173588258c134aec7421513 Mon Sep 17 00:00:00 2001
 | |
| From: Andy Green <andy@openmoko.com>
 | |
| Date: Fri, 25 Jul 2008 23:06:15 +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 ee0a51a..a1251c7 100644
 | |
| --- a/drivers/base/core.c
 | |
| +++ b/drivers/base/core.c
 | |
| @@ -51,6 +51,11 @@ static inline int device_is_not_partition(struct device *dev)
 | |
|   */
 | |
|  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.3
 | |
| 
 |