Skip to content

Commit 193a1aa

Browse files
committed
pci: align to the left the loop
simplify the code without change in behaviour, using a flow without `else` to reduce the blocks. Signed-off-by: Francesco Romani <[email protected]>
1 parent 02bdf58 commit 193a1aa

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pkg/pci/pci_linux.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -404,9 +404,9 @@ func (info *Info) getDevices() []*Device {
404404
dev = info.GetDevice(addr)
405405
if dev == nil {
406406
info.ctx.Warn("failed to get device information for PCI address %s", addr)
407-
} else {
408-
devs = append(devs, dev)
407+
continue
409408
}
409+
devs = append(devs, dev)
410410
}
411411
return devs
412412
}

0 commit comments

Comments
 (0)