Message ID | 20190604155135.25390-2-thierry.reding@gmail.com |
---|---|
State | Accepted |
Headers | show |
Series | [v2,1/3] soc/tegra: pmc: Fail to allocate more than one wake IRQ | expand |
diff --git a/drivers/soc/tegra/pmc.c b/drivers/soc/tegra/pmc.c index 653fe2c466f6..6e66b5e293be 100644 --- a/drivers/soc/tegra/pmc.c +++ b/drivers/soc/tegra/pmc.c @@ -1924,6 +1924,9 @@ static int tegra_pmc_irq_set_wake(struct irq_data *data, unsigned int on) unsigned int offset, bit; u32 value; + if (WARN_ON(data->hwirq == ULONG_MAX)) + return 0; + offset = data->hwirq / 32; bit = data->hwirq % 32;