[PATCH 2/3] convert cpu_to_l2cache() to of_find_next_cache_node()
Stephen Rothwell
sfr at canb.auug.org.au
Thu Dec 11 12:42:11 EST 2008
Hi Nathan,
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 ...
--
Cheers,
Stephen Rothwell sfr at canb.auug.org.au
http://www.canb.auug.org.au/~sfr/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://lists.ozlabs.org/pipermail/linuxppc-dev/attachments/20081211/a61f12ef/attachment.pgp>
More information about the Linuxppc-dev
mailing list