[PATCH] powerpc/85xx: Add support for MPC8536DS
Stephen Rothwell
sfr at canb.auug.org.au
Wed Jul 2 17:08:14 EST 2008
Hi Kumar,
On Wed, 2 Jul 2008 02:01:10 -0500 (CDT) Kumar Gala <galak at kernel.crashing.org> wrote:
>
> +void __init mpc8536_ds_pic_init(void)
> +{
> + struct mpic *mpic;
> + struct resource r;
> + struct device_node *np = NULL;
You don't need to initialise this.
> + np = of_find_node_by_type(np, "open-pic");
> +
Extra blank line.
> + if (np == NULL) {
> + printk(KERN_ERR "Could not find open-pic node\n");
> + return;
> + }
> +
> + if (of_address_to_resource(np, 0, &r)) {
> + printk(KERN_ERR "Failed to map mpic register space\n");
> + of_node_put(np);
> + return;
> + }
> +
> + mpic = mpic_alloc(np, r.start,
> + MPIC_PRIMARY | MPIC_WANTS_RESET |
> + MPIC_BIG_ENDIAN | MPIC_BROKEN_FRR_NIRQS,
> + 0, 256, " OpenPIC ");
> + BUG_ON(mpic == NULL);
> +
> + mpic_init(mpic);
You leak a reference to np here.
> +static struct of_device_id mpc8536_ds_ids[] = {
__initdata, please.
--
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/20080702/6c7536cd/attachment.pgp>
More information about the Linuxppc-dev
mailing list