Hi Dave,

On Mon, 11 Feb 2008 13:34:45 -0700 Dave Jiang <[EMAIL PROTECTED]> wrote:
>
> +++ b/arch/powerpc/sysdev/fsl_pci.c
> +static int __init mpc85xx_pcierr_setup(void)
> +{
> +     struct device_node *np = NULL;

You don't need to initialiase this as it is first used in
for_each_compatible_node().

> +     for_each_compatible_node(np, "pci", "fsl,mpc8540-pci") {

> +             of_dev = of_find_device_by_node(np);
> +             if (!of_dev)
> +                     return -ENODEV;

You need an of_node_put(np) before you return.

> +             pdev = platform_device_alloc("mpc85xx_pci_err", id++);
> +             if (!pdev)
> +                     return -ENOMEM;

And again.

> +     }
> +     return 0;
> +
> +error:
> +     platform_device_put(pdev);

You need an of_node_put(np) here.

> +     return err;
> +}
-- 
Cheers,
Stephen Rothwell                    [EMAIL PROTECTED]
http://www.canb.auug.org.au/~sfr/

Attachment: pgpTpwhfIYZ11.pgp
Description: PGP signature

_______________________________________________
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev

Reply via email to