Skip to content

Commit c9758cc

Browse files
ij-intelbjorn-helgaas
authored andcommitted
PCI/ERR: Cleanup misleading indentation inside if conditions
A few if conditions align misleadingly with the following code block. The checks are really cascading NULL checks that fit into 80 chars so remove newlines in between and realign to the if condition indent. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Ilpo Järvinen <[email protected]> Signed-off-by: Bjorn Helgaas <[email protected]>
1 parent c7ae396 commit c9758cc

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

drivers/pci/pcie/err.c

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -116,9 +116,7 @@ static int report_mmio_enabled(struct pci_dev *dev, void *data)
116116

117117
device_lock(&dev->dev);
118118
pdrv = dev->driver;
119-
if (!pdrv ||
120-
!pdrv->err_handler ||
121-
!pdrv->err_handler->mmio_enabled)
119+
if (!pdrv || !pdrv->err_handler || !pdrv->err_handler->mmio_enabled)
122120
goto out;
123121

124122
err_handler = pdrv->err_handler;
@@ -137,9 +135,7 @@ static int report_slot_reset(struct pci_dev *dev, void *data)
137135

138136
device_lock(&dev->dev);
139137
pdrv = dev->driver;
140-
if (!pdrv ||
141-
!pdrv->err_handler ||
142-
!pdrv->err_handler->slot_reset)
138+
if (!pdrv || !pdrv->err_handler || !pdrv->err_handler->slot_reset)
143139
goto out;
144140

145141
err_handler = pdrv->err_handler;
@@ -158,9 +154,7 @@ static int report_resume(struct pci_dev *dev, void *data)
158154
device_lock(&dev->dev);
159155
pdrv = dev->driver;
160156
if (!pci_dev_set_io_state(dev, pci_channel_io_normal) ||
161-
!pdrv ||
162-
!pdrv->err_handler ||
163-
!pdrv->err_handler->resume)
157+
!pdrv || !pdrv->err_handler || !pdrv->err_handler->resume)
164158
goto out;
165159

166160
err_handler = pdrv->err_handler;

0 commit comments

Comments
 (0)