[bugfix] Process error type instead of nvml.Return in internal/platform-support/dgpu

Signed-off-by: Christopher Desiniotis <cdesiniotis@nvidia.com>
This commit is contained in:
Christopher Desiniotis 2024-07-22 13:57:14 -07:00
parent c5c124b882
commit d8ccd50349
No known key found for this signature in database
GPG Key ID: 603C8E544D789A89

View File

@ -145,9 +145,9 @@ type toRequiredMigInfo struct {
} }
func (d *toRequiredMigInfo) getPlacementInfo() (int, int, int, error) { func (d *toRequiredMigInfo) getPlacementInfo() (int, int, int, error) {
gpu, ret := d.parent.GetMinorNumber() gpu, err := d.parent.GetMinorNumber()
if ret != nvml.SUCCESS { if err != nil {
return 0, 0, 0, fmt.Errorf("error getting GPU minor: %v", ret) return 0, 0, 0, fmt.Errorf("error getting GPU minor: %w", err)
} }
gi, ret := d.GetGpuInstanceId() gi, ret := d.GetGpuInstanceId()