Hi John, On Fri, 20 Jun 2008 10:58:35 -0600 John Rigby <[EMAIL PROTECTED]> wrote: > > +struct module;
Since you include linux/module.h, you don't need this.
> +static unsigned long devtree_getfreq(char *nodetype, char *clockname)
> +{
> + struct device_node *node;
> + const unsigned int *fp;
> + unsigned int val = 0;
> +
> + node = of_find_node_by_type(NULL, "soc");
> + if (node) {
> + fp = of_get_property(node, clockname, NULL);
> + if (fp)
> + val = of_read_ulong(fp, 1);
> + }
> + return val;
You leak a reference to the node here. Also every call has nodetype set to
"soc" and you don't use nodetype anyway.
--
Cheers,
Stephen Rothwell [EMAIL PROTECTED]
http://www.canb.auug.org.au/~sfr/
pgpW3etpiVRpY.pgp
Description: PGP signature
_______________________________________________ Linuxppc-dev mailing list [email protected] https://ozlabs.org/mailman/listinfo/linuxppc-dev
