From 4a3ee043517f3c40bbe9e2e0c57bb7cc99b78f01 Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Wed, 28 Aug 2019 19:29:19 +0200 Subject: [PATCH] oci: fix SA4009: argument e is overwritten before first use (staticcheck) ``` oci/devices_linux.go:64:72: SA4009: argument e is overwritten before first use (staticcheck) ``` Signed-off-by: Sebastiaan van Stijn --- oci/devices_linux.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/oci/devices_linux.go b/oci/devices_linux.go index 7f1658e53c..dc43faf764 100644 --- a/oci/devices_linux.go +++ b/oci/devices_linux.go @@ -61,7 +61,8 @@ func DevicesFromPath(pathOnHost, pathInContainer, cgroupPermissions string) (dev if src, e := os.Stat(resolvedPathOnHost); e == nil && src.IsDir() { // mount the internal devices recursively - filepath.Walk(resolvedPathOnHost, func(dpath string, f os.FileInfo, e error) error { + // TODO check if additional errors should be handled or logged + _ = filepath.Walk(resolvedPathOnHost, func(dpath string, f os.FileInfo, _ error) error { childDevice, e := devices.DeviceFromPath(dpath, cgroupPermissions) if e != nil { // ignore the device