mirror of
https://github.com/NVIDIA/nvidia-container-toolkit
synced 2024-11-28 23:17:24 +00:00
Merge pull request #619 from NVIDIA/fix-mig-get-minor-number
[bugfix] Process error type instead of nvml.Return
This commit is contained in:
commit
87a63a6159
@ -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()
|
||||
|
Loading…
Reference in New Issue
Block a user