Skip to content

Commit

Permalink
of/irq: init struct resource to 0 in of_irq_to_resource()
Browse files Browse the repository at this point in the history
It almost does not matter because most users use only the ->start member
of the struct. However if this struct is passed to a platform device
which is then added via platform_device_add() then the ->parent member is
also used.

Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Grant Likely <grant.likely@linaro.org>
  • Loading branch information
Sebastian Andrzej Siewior authored and Grant Likely committed Jul 22, 2013
1 parent c0cdfaa commit cf9e236
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/of/irq.c
Original file line number Diff line number Diff line change
Expand Up @@ -345,6 +345,7 @@ int of_irq_to_resource(struct device_node *dev, int index, struct resource *r)
if (r && irq) {
const char *name = NULL;

memset(r, 0, sizeof(*r));
/*
* Get optional "interrupts-names" property to add a name
* to the resource.
Expand Down

0 comments on commit cf9e236

Please sign in to comment.