Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 275e31b1 authored by Chen Gang's avatar Chen Gang Committed by Grant Likely
Browse files

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: default avatarChen Gang <gang.chen@asianux.com>
Signed-off-by: default avatarGrant Likely <grant.likely@linaro.org>
parent 346dbb79
Loading
Loading
Loading
Loading
+2 −1
Original line number Original line Diff line number Diff line
@@ -398,11 +398,12 @@ static void irq_domain_disassociate_many(struct irq_domain *domain,
	while (count--) {
	while (count--) {
		int irq = irq_base + count;
		int irq = irq_base + count;
		struct irq_data *irq_data = irq_get_irq_data(irq);
		struct irq_data *irq_data = irq_get_irq_data(irq);
		irq_hw_number_t hwirq = irq_data->hwirq;
		irq_hw_number_t hwirq;


		if (WARN_ON(!irq_data || irq_data->domain != domain))
		if (WARN_ON(!irq_data || irq_data->domain != domain))
			continue;
			continue;


		hwirq = irq_data->hwirq;
		irq_set_status_flags(irq, IRQ_NOREQUEST);
		irq_set_status_flags(irq, IRQ_NOREQUEST);


		/* remove chip and handler */
		/* remove chip and handler */