Fix disable msi when msi capability not exist issue

Signed-off-by: yezhonghui <yezhonghui@xiaomi.com>
This commit is contained in:
yezhonghui 2024-10-16 13:15:46 +08:00 committed by Xiang Xiao
parent 9985b0551e
commit 72e7935431
1 changed files with 4 additions and 1 deletions

View File

@ -1944,7 +1944,10 @@ int pci_connect_irq(FAR struct pci_device_s *dev, FAR int *irq, int num)
{
/* Disalbe MSI */
pci_disable_msi(dev, msi);
if (msi != 0)
{
pci_disable_msi(dev, msi);
}
/* Enable MSI-X */