Hi Mark,
On Wed, 16 Jan 2008 15:12:10 -0700 "Mark A. Greer" <[EMAIL PROTECTED]> wrote:
>
> +static void __init katana750i_setup_arch(void)
> +{
> + struct device_node *np;
> + phys_addr_t paddr;
> + const unsigned int *reg;
> +
> + np = of_find_compatible_node(NULL, NULL, "katana750i,cpld");
> + if (!np)
> + printk(KERN_WARNING "No CPLD DT node; functionality reduced\n");
> + else {
> + reg = of_get_property(np, "reg", NULL);
> + if (!reg)
> + printk(KERN_WARNING "No CPLD reg property; "
> + "functionality reduced\n");
> + else {
> + paddr = of_translate_address(np, reg);
> + of_node_put(np);
> + cpld_base = ioremap(paddr, reg[1]);
> + }
> + }You need an of_node_put(np) for the !reg case above. Maybe you should just put it after the else clause instead of in it. -- Cheers, Stephen Rothwell [EMAIL PROTECTED] http://www.canb.auug.org.au/~sfr/
pgpF1Bvk00KPU.pgp
Description: PGP signature
_______________________________________________ Linuxppc-dev mailing list [email protected] https://ozlabs.org/mailman/listinfo/linuxppc-dev
