From 4e5c7eeafc71805ab5fa0f082c85f64fccb4f392 Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Sat, 26 Oct 2024 18:59:56 +0200 Subject: [PATCH] daemon: cdiHandler.getErrors: remove var that shadowed import Signed-off-by: Sebastiaan van Stijn --- daemon/cdi.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/daemon/cdi.go b/daemon/cdi.go index 75b59511135a7..2469780d36340 100644 --- a/daemon/cdi.go +++ b/daemon/cdi.go @@ -99,10 +99,8 @@ func (c *cdiHandler) injectCDIDevices(s *specs.Spec, dev *deviceInstance) error // getErrors returns a single error representation of errors that may have occurred while refreshing the CDI registry. func (c *cdiHandler) getErrors() error { - errors := c.registry.GetErrors() - var err *multierror.Error - for _, errs := range errors { + for _, errs := range c.registry.GetErrors() { err = multierror.Append(err, errs...) } return err.ErrorOrNil()