Skip to content

Commit 87a63a6

Browse files
authored
Merge pull request #619 from NVIDIA/fix-mig-get-minor-number
[bugfix] Process error type instead of nvml.Return
2 parents c5c124b + d8ccd50 commit 87a63a6

File tree

1 file changed

+3
-3
lines changed
  • internal/platform-support/dgpu

1 file changed

+3
-3
lines changed

internal/platform-support/dgpu/nvml.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -145,9 +145,9 @@ type toRequiredMigInfo struct {
145145
}
146146

147147
func (d *toRequiredMigInfo) getPlacementInfo() (int, int, int, error) {
148-
gpu, ret := d.parent.GetMinorNumber()
149-
if ret != nvml.SUCCESS {
150-
return 0, 0, 0, fmt.Errorf("error getting GPU minor: %v", ret)
148+
gpu, err := d.parent.GetMinorNumber()
149+
if err != nil {
150+
return 0, 0, 0, fmt.Errorf("error getting GPU minor: %w", err)
151151
}
152152

153153
gi, ret := d.GetGpuInstanceId()

0 commit comments

Comments
 (0)