Commit:     c6d01179bfee3048cce98fe303d7265faa3861a7
Parent:     de4c928b843063b7079c35c950c1d38c559fa0cb
Author:     Stephen Rothwell <[EMAIL PROTECTED]>
AuthorDate: Tue Feb 5 13:13:15 2008 +1100
Committer:  Paul Mackerras <[EMAIL PROTECTED]>
CommitDate: Wed Feb 6 16:30:00 2008 +1100

    [POWERPC] Avoid possible extra of_node_put in axon_msi.c
    I got this warning from gcc:
    arch/powerpc/platforms/cell/axon_msi.c:118: warning: 'tmp' may be used 
uninitialized in this function
    Which turns out to be a false positive, but pointed out that it was
    possible for the error path in find_msi_translator() to do an extra
    of_node_put on a node.  This fixes it by localising the ref counting
    a bit.  As a side effect, the warning goes away.
    Signed-off-by: Stephen Rothwell <[EMAIL PROTECTED]>
    Signed-off-by: Paul Mackerras <[EMAIL PROTECTED]>
 arch/powerpc/platforms/cell/axon_msi.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/powerpc/platforms/cell/axon_msi.c 
index b9a97c4..d95e71d 100644
--- a/arch/powerpc/platforms/cell/axon_msi.c
+++ b/arch/powerpc/platforms/cell/axon_msi.c
@@ -137,6 +137,7 @@ static struct axon_msic *find_msi_translator(struct pci_dev 
        tmp = dn;
        dn = of_find_node_by_phandle(*ph);
+       of_node_put(tmp);
        if (!dn) {
                        "axon_msi: msi-translator doesn't point to a node\n");
@@ -154,7 +155,6 @@ static struct axon_msic *find_msi_translator(struct pci_dev 
-       of_node_put(tmp);
        return msic;
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at

Reply via email to