diff options
author | Chen Gang <gang.chen@asianux.com> | 2013-05-14 07:02:45 -0400 |
---|---|---|
committer | Grant Likely <grant.likely@linaro.org> | 2013-06-08 16:15:09 -0400 |
commit | 275e31b10ce20613aedceaa5160129c64b260a98 (patch) | |
tree | 07e207a672bc8adf3c732d3a1194c9bfce2bb69f /kernel/irq | |
parent | 346dbb79ea0118ebb0df372b35cab9d5805216cd (diff) |
kernel/irq/irqdomain.c: before use 'irq_data', need check it whether valid.
Since irq_data may be NULL, if so, we WARN_ON(), and continue, 'hwirq'
which related with 'irq_data' has to initialize later, or it will cause
issue.
Signed-off-by: Chen Gang <gang.chen@asianux.com>
Signed-off-by: Grant Likely <grant.likely@linaro.org>
Diffstat (limited to 'kernel/irq')
-rw-r--r-- | kernel/irq/irqdomain.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/kernel/irq/irqdomain.c b/kernel/irq/irqdomain.c index d1adaedb435f..8c4c8ea6a205 100644 --- a/kernel/irq/irqdomain.c +++ b/kernel/irq/irqdomain.c | |||
@@ -398,11 +398,12 @@ static void irq_domain_disassociate_many(struct irq_domain *domain, | |||
398 | while (count--) { | 398 | while (count--) { |
399 | int irq = irq_base + count; | 399 | int irq = irq_base + count; |
400 | struct irq_data *irq_data = irq_get_irq_data(irq); | 400 | struct irq_data *irq_data = irq_get_irq_data(irq); |
401 | irq_hw_number_t hwirq = irq_data->hwirq; | 401 | irq_hw_number_t hwirq; |
402 | 402 | ||
403 | if (WARN_ON(!irq_data || irq_data->domain != domain)) | 403 | if (WARN_ON(!irq_data || irq_data->domain != domain)) |
404 | continue; | 404 | continue; |
405 | 405 | ||
406 | hwirq = irq_data->hwirq; | ||
406 | irq_set_status_flags(irq, IRQ_NOREQUEST); | 407 | irq_set_status_flags(irq, IRQ_NOREQUEST); |
407 | 408 | ||
408 | /* remove chip and handler */ | 409 | /* remove chip and handler */ |