From f8870b31be31187472aafd49bc98774d3166cace Mon Sep 17 00:00:00 2001 From: Evan Lezar Date: Fri, 25 Aug 2023 16:55:04 +0200 Subject: [PATCH] Fix filepath.Join with single arg Signed-off-by: Evan Lezar --- internal/discover/graphics.go | 2 +- pkg/nvcdi/driver-nvml.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/internal/discover/graphics.go b/internal/discover/graphics.go index 0bc9451e..b52eb563 100644 --- a/internal/discover/graphics.go +++ b/internal/discover/graphics.go @@ -239,7 +239,7 @@ func newDRMDeviceFilter(logger logger.Interface, devices image.VisibleDevices, d return nil, fmt.Errorf("failed to determine DRM devices for %v: %v", busID, err) } for _, drmDeviceNode := range drmDeviceNodes { - filter[filepath.Join(drmDeviceNode)] = true + filter[drmDeviceNode] = true } } diff --git a/pkg/nvcdi/driver-nvml.go b/pkg/nvcdi/driver-nvml.go index 28dacae3..a2a4a41c 100644 --- a/pkg/nvcdi/driver-nvml.go +++ b/pkg/nvcdi/driver-nvml.go @@ -128,9 +128,9 @@ func getFirmwareSearchPaths(logger logger.Interface) ([]string, error) { standardPaths := []string{ filepath.Join("/lib/firmware/updates/", utsRelease), - filepath.Join("/lib/firmware/updates/"), + "/lib/firmware/updates/", filepath.Join("/lib/firmware/", utsRelease), - filepath.Join("/lib/firmware/"), + "/lib/firmware/", } return append(firmwarePaths, standardPaths...), nil