diff options
author | Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> | 2023-09-11 14:53:52 +0200 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2023-10-10 23:40:18 +0200 |
commit | d15f18053e5cc5576af9e7eef0b2a91169b6326d (patch) | |
tree | 011dd3464d5b7d4e16b7f37e8c65d0ad5f7baf14 /drivers/pci/pci-pf-stub.c | |
parent | atm: iphase: Do PCI error checks on own line (diff) | |
download | linux-d15f18053e5cc5576af9e7eef0b2a91169b6326d.tar.xz linux-d15f18053e5cc5576af9e7eef0b2a91169b6326d.zip |
PCI: Do error check on own line to split long "if" conditions
Placing PCI error code check inside "if" condition usually results in need
to split lines. Combined with additional conditions the "if" condition
becomes messy.
Convert to the usual error handling pattern with an additional variable to
improve code readability. In addition, reverse the logic in
pci_find_vsec_capability() to get rid of &&.
No functional changes intended.
Link: https://lore.kernel.org/r/20230911125354.25501-5-ilpo.jarvinen@linux.intel.com
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
[bhelgaas: PCI_POSSIBLE_ERROR()]
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Diffstat (limited to 'drivers/pci/pci-pf-stub.c')
0 files changed, 0 insertions, 0 deletions