PCI: dwc: Correct msi_irq condition in dw_pcie_free_msi()
authorDmitry Baryshkov <dmitry.baryshkov@linaro.org>
Thu, 7 Jul 2022 13:47:28 +0000 (16:47 +0300)
committerBjorn Helgaas <bhelgaas@google.com>
Mon, 1 Aug 2022 20:15:32 +0000 (15:15 -0500)
commit3c62f878a9695111a43dc2c1f90cf4b15efc76a0
treeaba59edd1ad7f3d088381434b47a3095ee57364d
parent6be6f8529bd7f3eb40a5f061badfc230e6a9fc9c
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.org
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Reviewed-by: Johan Hovold <johan+linaro@kernel.org>
Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
drivers/pci/controller/dwc/pcie-designware-host.c