Skip to content

Commit

Permalink
powerpc: Rework qe_ic_init() so we can avoid freeing the irq_host
Browse files Browse the repository at this point in the history
If we do the call to of_address_to_resource() first, then we don't
need to worry about freeing the irq_host (which the code doesn't do
currently anyway).

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
  • Loading branch information
Michael Ellerman authored and Paul Mackerras committed Jun 9, 2008
1 parent 84f1c1e commit 2272a55
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions arch/powerpc/sysdev/qe_lib/qe_ic.c
Original file line number Diff line number Diff line change
Expand Up @@ -329,6 +329,10 @@ void __init qe_ic_init(struct device_node *node, unsigned int flags,
struct resource res;
u32 temp = 0, ret, high_active = 0;

ret = of_address_to_resource(node, 0, &res);
if (ret)
return;

qe_ic = alloc_bootmem(sizeof(struct qe_ic));
if (qe_ic == NULL)
return;
Expand All @@ -342,10 +346,6 @@ void __init qe_ic_init(struct device_node *node, unsigned int flags,
return;
}

ret = of_address_to_resource(node, 0, &res);
if (ret)
return;

qe_ic->regs = ioremap(res.start, res.end - res.start + 1);

qe_ic->irqhost->host_data = qe_ic;
Expand Down

0 comments on commit 2272a55

Please sign in to comment.