提交 af10cce7 编写于 作者: K Kuppuswamy Sathyanarayanan 提交者: Bjorn Helgaas

PCI/AER: Remove redundant dev->aer_cap checks

pcie_aer_get_firmware_first() checks dev->aer_cap, so we can remove
redundant dev->aer_cap checks in the callers.

Link: https://lore.kernel.org/r/d5ccc7a060ec9cdc234bdae7df8a0a4410f13f42.1590534843.git.sathyanarayanan.kuppuswamy@linux.intel.comSigned-off-by: NKuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@linux.intel.com>
Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
上级 123f985a
......@@ -253,13 +253,9 @@ void pci_aer_clear_device_status(struct pci_dev *dev)
int pci_aer_clear_nonfatal_status(struct pci_dev *dev)
{
int pos;
int pos = dev->aer_cap;
u32 status, sev;
pos = dev->aer_cap;
if (!pos)
return -EIO;
if (!pcie_aer_is_native(dev))
return -EIO;
......@@ -276,13 +272,9 @@ EXPORT_SYMBOL_GPL(pci_aer_clear_nonfatal_status);
void pci_aer_clear_fatal_status(struct pci_dev *dev)
{
int pos;
int pos = dev->aer_cap;
u32 status, sev;
pos = dev->aer_cap;
if (!pos)
return;
if (!pcie_aer_is_native(dev))
return;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册