public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Andrew Morton <akpm@osdl.org>
Cc: Linus Torvalds <torvalds@osdl.org>,
	Linux Kernel list <linux-kernel@vger.kernel.org>
Subject: [PATCH] ppc32: Fix type/bug in pmac_feature.c
Date: Fri, 24 Sep 2004 10:25:37 +1000	[thread overview]
Message-ID: <1095985537.3830.23.camel@gaston> (raw)

Hi !

A typo in pmac_feature.c can cause us to use a bogus node pointer when
iterating the i2c controllers during boot. Fortunately, it seems that
we always find the one we are looking for first, and thus never ended
up in an inifinite loop here, but let's fix it and fix the warning at
the same time.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>

===== arch/ppc/platforms/pmac_feature.c 1.26 vs edited =====
--- 1.26/arch/ppc/platforms/pmac_feature.c	2004-06-23 06:04:07 +10:00
+++ edited/arch/ppc/platforms/pmac_feature.c	2004-09-24 10:23:15 +10:00
@@ -2665,7 +2665,7 @@
 			struct device_node *p = of_get_parent(ui2c);
 			if (p && !strcmp(p->name, "uni-n"))
 				break;
-			ui2c = of_find_node_by_type(np, "i2c");
+			ui2c = of_find_node_by_type(ui2c, "i2c");
 		}
 		if (ui2c == NULL)
 			break;



                 reply	other threads:[~2004-09-24  0:28 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=1095985537.3830.23.camel@gaston \
    --to=benh@kernel.crashing.org \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@osdl.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