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

Commit a5a5ed7c authored by Chris Lew's avatar Chris Lew
Browse files

soc: qcom: qsee_ipc_irq: Sanitize IRQ desc



There is a chance that the irq_to_desc function will return NULL if the
client unregisters their IRQ. Check if desc is NULL before calling the
IRQ_HANDLER.

Change-Id: I10950e19138eb8e6f7673f61b7de78696e4c2c27
Signed-off-by: default avatarChris Lew <clew@codeaurora.org>
parent 55e5efd5
Loading
Loading
Loading
Loading
+2 −1
Original line number Original line Diff line number Diff line
@@ -100,6 +100,7 @@ static irqreturn_t qsee_intr(int irq, void *data)


		irq_pin = irq_find_mapping(qirq->domain, to_hwirq(i, j));
		irq_pin = irq_find_mapping(qirq->domain, to_hwirq(i, j));
		desc = irq_to_desc(irq_pin);
		desc = irq_to_desc(irq_pin);
		if (desc)
			handle_simple_irq(desc);
			handle_simple_irq(desc);
		regmap_write(qirq->regmap, bank->data->clear, BIT(j));
		regmap_write(qirq->regmap, bank->data->clear, BIT(j));
	}
	}