@@ -3358,21 +3358,20 @@ static int reset_intel_generic_dev(struct pci_dev *dev, int probe)
int pos;
/* only implement PCI_CLASS_SERIAL_USB at present */
- if ((dev->class >> 8) == PCI_CLASS_SERIAL_USB) {
- pos = pci_find_capability(dev, PCI_CAP_ID_VNDR);
- if (!pos)
- return -ENOTTY;
-
- if (probe)
- return 0;
+ if ((dev->class >> 8) != PCI_CLASS_SERIAL_USB)
+ return -ENOTTY;
- pci_write_config_byte(dev, pos + 0x4, 1);
- msleep(100);
+ pos = pci_find_capability(dev, PCI_CAP_ID_VNDR);
+ if (!pos)
+ return -ENOTTY;
+ if (probe)
return 0;
- } else {
- return -ENOTTY;
- }
+
+ pci_write_config_byte(dev, pos + 0x4, 1);
+ msleep(100);
+
+ return 0;
}
static int reset_intel_82599_sfp_virtfn(struct pci_dev *dev, int probe)
Restructure reset_intel_generic_dev() slightly to return early for non-USB devices. That makes the body of the function non-indented. No functional change. Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> CC: Dexuan Cui <dexuan.cui@intel.com> CC: Yu Zhao <yu.zhao@intel.com> --- drivers/pci/quirks.c | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-pci" in