[PATCH 2/3] convert cpu_to_l2cache() to of_find_next_cache_node()
Nathan Lynch
ntl at pobox.com
Thu Dec 11 13:00:40 EST 2008
Stephen Rothwell wrote:
> On Wed, 10 Dec 2008 18:46:05 -0600 Nathan Lynch <ntl at pobox.com> wrote:
> >
> > @@ -418,13 +416,7 @@ static struct device_node *cpu_to_l2cache(int cpu)
> > if (np == NULL)
> > return NULL;
> >
> > - php = of_get_property(np, "l2-cache", NULL);
> > - if (php == NULL)
> > - return NULL;
> > - ph = *php;
> > - of_node_put(np);
> > -
> > - return of_find_node_by_phandle(ph);
> > + return of_find_next_cache_node(np);
> > }
>
> This leaks a reference on np ...
Thanks, will fix.
More information about the Linuxppc-dev
mailing list