[PATCH] Check the irq number is within bounds