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@xxxxxxxxxx> CC: Dexuan Cui <dexuan.cui@xxxxxxxxx> CC: Yu Zhao <yu.zhao@xxxxxxxxx> --- drivers/pci/quirks.c | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c index 356a401..ed2763b2 100644 --- a/drivers/pci/quirks.c +++ b/drivers/pci/quirks.c @@ -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) -- To unsubscribe from this list: send the line "unsubscribe linux-pci" in