Skip to content

Commit 428dcfe

Browse files
committed
pci/pci.go: fix empty return in ParsePciDevices read function
fix empty return in ParsePciDevices read function causing null string to be returned.
1 parent 60b1cca commit 428dcfe

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

pci/pci.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,8 @@ func readFromFile(f string, w, start, end int) (string, error) {
6868
return "", errors.New("invalid start:end")
6969
}
7070
return ret[start:end], nil
71+
} else {
72+
return ret, nil
7173
}
7274
}
7375
}

0 commit comments

Comments
 (0)