[PATCH 05/10] debug-backtrace-not-choke-on-null-dev_blah.patch

Holger Freyther zecke at openmoko.org
Mon Jun 16 12:03:35 CEST 2008


On Monday 16 June 2008 00:17:33 Andy Green wrote:
> Signed-off-by: Andy Green <andy at 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*";
> +	}

wow, where did we call this from a driver with no device attached? Is that for 
06 and the backlight resume?

z.

PS: Janitor comment: add a space after KERN_ERR




More information about the openmoko-kernel mailing list