Hi Dave,
On Mon, 11 Feb 2008 13:34:45 -0700 Dave Jiang [off-list ref] wrote:
quoted hunk ↗ jump to hunk
+++ 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 sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/