Skip to content

Commit

Permalink
pci: align to the left the loop
Browse files Browse the repository at this point in the history
simplify the code without change in behaviour, using
a flow without `else` to reduce the blocks.

Signed-off-by: Francesco Romani <fromani@redhat.com>
  • Loading branch information
ffromani committed Jul 21, 2023
1 parent 7a46924 commit ef7a5e0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/pci/pci_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -405,9 +405,9 @@ func (info *Info) getDevices() []*Device {
dev = info.GetDevice(addr)
if dev == nil {
info.ctx.Warn("failed to get device information for PCI address %s", addr)
} else {
devs = append(devs, dev)
continue
}
devs = append(devs, dev)
}
return devs
}

0 comments on commit ef7a5e0

Please sign in to comment.