On Fri, Jul 11, 2008 at 09:48:59PM +0400, Anton Vorontsov wrote:
> Firstly kernel warns at set_irq_chip, and then dies completely:
> 
> Trying to install chip for IRQ-1
> ------------[ cut here ]------------
> Badness at c00463b0 [verbose debug info unavailable]
[..]
> Unable to handle kernel paging request for data at address 0x3863ce7c

Btw, I'm seeing this on linux-next. Just looked into the current Linus'
tree, and it seems that the bug is there too. So, this is probably should
go for 2.6.26.

> Signed-off-by: Anton Vorontsov <[EMAIL PROTECTED]>
> ---
>  drivers/of/of_i2c.c |   13 +++++++------
>  1 files changed, 7 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/of/of_i2c.c b/drivers/of/of_i2c.c
> index b2ccdcb..95a24de 100644
> --- a/drivers/of/of_i2c.c
> +++ b/drivers/of/of_i2c.c
> @@ -93,10 +93,8 @@ void of_register_i2c_devices(struct i2c_adapter *adap,
>               if (info.irq == NO_IRQ)
>                       info.irq = -1;
>  
> -             if (of_find_i2c_driver(node, &info) < 0) {
> -                     irq_dispose_mapping(info.irq);
> -                     continue;
> -             }
> +             if (of_find_i2c_driver(node, &info) < 0)
> +                     goto err;
>  
>               info.addr = *addr;
>  
> @@ -107,9 +105,12 @@ void of_register_i2c_devices(struct i2c_adapter *adap,
>                       printk(KERN_ERR
>                              "of-i2c: Failed to load driver for %s\n",
>                              info.type);
> -                     irq_dispose_mapping(info.irq);
> -                     continue;
> +                     goto err;
>               }
> +             continue;
> +err:
> +             if (info.irq > 0)
> +                     irq_dispose_mapping(info.irq);
>       }
>  }
>  EXPORT_SYMBOL(of_register_i2c_devices);
> -- 
> 1.5.5.4

-- 
Anton Vorontsov
email: [EMAIL PROTECTED]
irc://irc.freenode.net/bd2
_______________________________________________
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev

Reply via email to