Skip to content

Commit

Permalink
Merge branch 'pci/msi'
Browse files Browse the repository at this point in the history
- Update coding style to "mainline is normal path, errors are the
  exceptions" (Andy Shevchenko)

* pci/msi:
  PCI/MSI: Make error path handling follow the standard pattern
  • Loading branch information
bjorn-helgaas committed May 16, 2024
2 parents 58adb5e + 0ba5cd9 commit ed11a28
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions drivers/pci/msi/msi.c
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,11 @@ static int pcim_setup_msi_release(struct pci_dev *dev)
return 0;

ret = devm_add_action(&dev->dev, pcim_msi_release, dev);
if (!ret)
dev->is_msi_managed = true;
return ret;
if (ret)
return ret;

dev->is_msi_managed = true;
return 0;
}

/*
Expand All @@ -99,9 +101,10 @@ static int pci_setup_msi_context(struct pci_dev *dev)
{
int ret = msi_setup_device_data(&dev->dev);

if (!ret)
ret = pcim_setup_msi_release(dev);
return ret;
if (ret)
return ret;

return pcim_setup_msi_release(dev);
}

/*
Expand Down

0 comments on commit ed11a28

Please sign in to comment.