summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBjorn Helgaas <bhelgaas@google.com>2024-05-17 01:14:11 +0200
committerBjorn Helgaas <bhelgaas@google.com>2024-05-17 01:14:11 +0200
commited11a28cb709a9ab69c4cd4e0669079a455f9a8d (patch)
treeb94bc0143c578c400cb832054063105620b56d40
parentMerge branch 'pci/hotplug' (diff)
parentPCI/MSI: Make error path handling follow the standard pattern (diff)
downloadlinux-ed11a28cb709a9ab69c4cd4e0669079a455f9a8d.tar.xz
linux-ed11a28cb709a9ab69c4cd4e0669079a455f9a8d.zip
Merge branch 'pci/msi'
- 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
-rw-r--r--drivers/pci/msi/msi.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/drivers/pci/msi/msi.c b/drivers/pci/msi/msi.c
index 682fa877478f..c5625dd9bf49 100644
--- a/drivers/pci/msi/msi.c
+++ b/drivers/pci/msi/msi.c
@@ -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;
}
/*
@@ -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);
}
/*