Skip to content

Commit d8ccd50

Browse files
committed
[bugfix] Process error type instead of nvml.Return in internal/platform-support/dgpu
Signed-off-by: Christopher Desiniotis <cdesiniotis@nvidia.com>
1 parent c5c124b commit d8ccd50

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)