summaryrefslogtreecommitdiff
path: root/drivers/of/irq.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2013-08-04 04:36:46 (GMT)
committerDavid S. Miller <davem@davemloft.net>2013-08-04 04:36:46 (GMT)
commit0e76a3a587fc7abda2badf249053b427baad255e (patch)
tree646a1da67dc25654552028225ca4b7a0a8043cc9 /drivers/of/irq.c
parentfba3679d34511c42bf452e89dda457a1219eb43a (diff)
parent72a67a94bcba71a5fddd6b3596a20604d2b5dcd6 (diff)
downloadlinux-fsl-qoriq-0e76a3a587fc7abda2badf249053b427baad255e.tar.xz
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Merge net into net-next to setup some infrastructure Eric Dumazet needs for usbnet changes. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/of/irq.c')
-rw-r--r--drivers/of/irq.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/of/irq.c b/drivers/of/irq.c
index a3c1c5a..1264923 100644
--- a/drivers/of/irq.c
+++ b/drivers/of/irq.c
@@ -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.
@@ -482,8 +483,9 @@ void __init of_irq_init(const struct of_device_id *matches)
}
/* Get the next pending parent that might have children */
- desc = list_first_entry(&intc_parent_list, typeof(*desc), list);
- if (list_empty(&intc_parent_list) || !desc) {
+ desc = list_first_entry_or_null(&intc_parent_list,
+ typeof(*desc), list);
+ if (!desc) {
pr_err("of_irq_init: children remain, but no parents\n");
break;
}