[PATCH] mpc832x_rdb.c: prevent using uninitialized variable

Scott Wood scottwood at freescale.com
Fri Jul 27 02:48:33 EST 2007


On Thu, Jul 26, 2007 at 06:01:39PM +0400, Anton Vorontsov wrote:
> If CONFIG_PCI undefined, np will be used uninitialized, thereby
> find_node_by_name(np, "par_io") will fail.

This is the wrong fix -- you should be passing NULL to the par_io call
rather than np.  Otherwise, if the par_io is earlier in the tree than the
pci, you won't find it.

-Scott



More information about the Linuxppc-dev mailing list