From f57b28298ebfbdfca06b5d920ea89f7da5b304b9 Mon Sep 17 00:00:00 2001 From: Wesley Hershberger Date: Thu, 9 Jan 2025 14:40:16 -0600 Subject: [PATCH] lxd/storage: Remove redundant error check Signed-off-by: Wesley Hershberger --- lxd/storage/utils.go | 6 ------ 1 file changed, 6 deletions(-) diff --git a/lxd/storage/utils.go b/lxd/storage/utils.go index e6684a0bda5f..86858186d735 100644 --- a/lxd/storage/utils.go +++ b/lxd/storage/utils.go @@ -1043,9 +1043,6 @@ func VolumeUsedByProfileDevices(s *state.State, poolName string, projectName str // storage project as volume. for i, profile := range profiles { profileStorageProject := project.StorageVolumeProjectFromRecord(profileProjects[i], volumeType) - if err != nil { - return err - } // Check profile's storage project is the same as the volume's project. // If not then the volume names mentioned in the profile's config cannot be referring to volumes @@ -1109,9 +1106,6 @@ func VolumeUsedByInstanceDevices(s *state.State, poolName string, projectName st } instStorageProject := project.StorageVolumeProjectFromRecord(&p, volumeType) - if err != nil { - return err - } // Check instance's storage project is the same as the volume's project. // If not then the volume names mentioned in the instance's config cannot be referring to volumes