Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 143842
b: refs/heads/master
c: 6d25b68
h: refs/heads/master
v: v3
  • Loading branch information
Ilpo Järvinen authored and Grant Likely committed Apr 20, 2009
1 parent 7309b6e commit 34590dd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 8db70d3deee33e661d091b3e317fccc87bf0975d
refs/heads/master: 6d25b688ecc488753af3c9e6f6a9a575b863cf37
11 changes: 5 additions & 6 deletions trunk/arch/powerpc/kernel/prom_parse.c
Original file line number Diff line number Diff line change
Expand Up @@ -971,7 +971,7 @@ int of_irq_map_one(struct device_node *device, int index, struct of_irq *out_irq
struct device_node *p;
const u32 *intspec, *tmp, *addr;
u32 intsize, intlen;
int res;
int res = -EINVAL;

DBG("of_irq_map_one: dev=%s, index=%d\n", device->full_name, index);

Expand All @@ -995,21 +995,20 @@ int of_irq_map_one(struct device_node *device, int index, struct of_irq *out_irq

/* Get size of interrupt specifier */
tmp = of_get_property(p, "#interrupt-cells", NULL);
if (tmp == NULL) {
of_node_put(p);
return -EINVAL;
}
if (tmp == NULL)
goto out;
intsize = *tmp;

DBG(" intsize=%d intlen=%d\n", intsize, intlen);

/* Check index */
if ((index + 1) * intsize > intlen)
return -EINVAL;
goto out;

/* Get new specifier and map it */
res = of_irq_map_raw(p, intspec + index * intsize, intsize,
addr, out_irq);
out:
of_node_put(p);
return res;
}
Expand Down

0 comments on commit 34590dd

Please sign in to comment.