LinuxPPC-Dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Stephen Rothwell <sfr@canb.auug.org.au>
To: Dave Jiang <djiang@mvista.com>
Cc: linuxppc-dev@ozlabs.org
Subject: Re: [PATCH 2/2] powerpc: create mpc85xx pci err platform device for EDAC
Date: Tue, 12 Feb 2008 10:32:43 +1100	[thread overview]
Message-ID: <20080212103243.fe970150.sfr@canb.auug.org.au> (raw)
In-Reply-To: <20080211203445.GB5331@blade.az.mvista.com>

[-- Attachment #1: Type: text/plain, Size: 868 bytes --]

Hi Dave,

On Mon, 11 Feb 2008 13:34:45 -0700 Dave Jiang <djiang@mvista.com> 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                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

      parent reply	other threads:[~2008-02-11 23:32 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-11 20:34 [PATCH 2/2] powerpc: create mpc85xx pci err platform device for EDAC Dave Jiang
2008-02-11 21:56 ` Kumar Gala
2008-02-13 21:41   ` Dave Jiang
2008-02-11 23:32 ` Stephen Rothwell [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080212103243.fe970150.sfr@canb.auug.org.au \
    --to=sfr@canb.auug.org.au \
    --cc=djiang@mvista.com \
    --cc=linuxppc-dev@ozlabs.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox