提交 3c62f878 编写于 作者: D Dmitry Baryshkov 提交者: Bjorn Helgaas

PCI: dwc: Correct msi_irq condition in dw_pcie_free_msi()

The dwc-based drivers set pp->msi_irq to -ENODEV if they do not want the
dwc core to do anything with pp->msi_irq.

dw_pcie_host_init() sets the handler and data when "pp->msi_irq > 0", so
use the same condition when removing the handler and data in
dw_pcie_free_msi().

Link: https://lore.kernel.org/r/20220707134733.2436629-2-dmitry.baryshkov@linaro.orgSigned-off-by: NDmitry Baryshkov <dmitry.baryshkov@linaro.org>
Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
Reviewed-by: NRob Herring <robh@kernel.org>
Reviewed-by: NJohan Hovold <johan+linaro@kernel.org>
Reviewed-by: NManivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
上级 6be6f852
...@@ -257,7 +257,7 @@ int dw_pcie_allocate_domains(struct dw_pcie_rp *pp) ...@@ -257,7 +257,7 @@ int dw_pcie_allocate_domains(struct dw_pcie_rp *pp)
static void dw_pcie_free_msi(struct dw_pcie_rp *pp) static void dw_pcie_free_msi(struct dw_pcie_rp *pp)
{ {
if (pp->msi_irq) if (pp->msi_irq > 0)
irq_set_chained_handler_and_data(pp->msi_irq, NULL, NULL); irq_set_chained_handler_and_data(pp->msi_irq, NULL, NULL);
irq_domain_remove(pp->msi_domain); irq_domain_remove(pp->msi_domain);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册