From d8ccd503499dbbd0b8146abd8f9efe4169b4ac23 Mon Sep 17 00:00:00 2001 From: Christopher Desiniotis Date: Mon, 22 Jul 2024 13:57:14 -0700 Subject: [PATCH] [bugfix] Process error type instead of nvml.Return in internal/platform-support/dgpu Signed-off-by: Christopher Desiniotis --- internal/platform-support/dgpu/nvml.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/internal/platform-support/dgpu/nvml.go b/internal/platform-support/dgpu/nvml.go index e4b67641..be111102 100644 --- a/internal/platform-support/dgpu/nvml.go +++ b/internal/platform-support/dgpu/nvml.go @@ -145,9 +145,9 @@ type toRequiredMigInfo struct { } func (d *toRequiredMigInfo) getPlacementInfo() (int, int, int, error) { - gpu, ret := d.parent.GetMinorNumber() - if ret != nvml.SUCCESS { - return 0, 0, 0, fmt.Errorf("error getting GPU minor: %v", ret) + gpu, err := d.parent.GetMinorNumber() + if err != nil { + return 0, 0, 0, fmt.Errorf("error getting GPU minor: %w", err) } gi, ret := d.GetGpuInstanceId()