[PATCH 09/16] Use of_get_next_parent() in axon_msi.c
Stephen Rothwell
sfr at canb.auug.org.au
Fri Oct 26 17:24:45 EST 2007
On Fri, 26 Oct 2007 16:54:41 +1000 (EST) Michael Ellerman <michael at ellerman.id.au> wrote:
>
> +++ b/arch/powerpc/platforms/cell/axon_msi.c
> @@ -125,7 +125,7 @@ static struct axon_msic *find_msi_translator(struct pci_dev *dev)
> return NULL;
> }
>
> - for (; dn; tmp = of_get_parent(dn), of_node_put(dn), dn = tmp) {
> + for (; dn; dn = of_get_next_parent(dn)) {
> ph = of_get_property(dn, "msi-translator", NULL);
> if (ph)
> break;
You no longer assign anything to tmp, but just below here, you may jump
to out_error: which will do an of_node_put(tmp). So you need to
initialise tmp or have another error goto label.
--
Cheers,
Stephen Rothwell sfr at canb.auug.org.au
http://www.canb.auug.org.au/~sfr/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.ozlabs.org/pipermail/linuxppc-dev/attachments/20071026/d707b588/attachment.pgp>
More information about the Linuxppc-dev
mailing list