Skip to content

Commit

Permalink
x86: DT: Fix return condition in irq_create_of_mapping()
Browse files Browse the repository at this point in the history
The xlate() function returns 0 or a negative error code. Returning the
error code blindly will be seen as an huge irq number by the calling
function because irq_create_of_mapping() returns an unsigned value.

Return 0 (NO_IRQ) as required.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
  • Loading branch information
Thomas Gleixner committed Mar 24, 2011
1 parent cbb84c4 commit 00a30b2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/x86/kernel/devicetree.c
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ unsigned int irq_create_of_mapping(struct device_node *controller,
return 0;
ret = ih->xlate(ih, intspec, intsize, &virq, &type);
if (ret)
return ret;
return 0;
if (type == IRQ_TYPE_NONE)
return virq;
/* set the mask if it is different from current */
Expand Down

0 comments on commit 00a30b2

Please sign in to comment.