fix: Remove unneeded code

errors.Join(errs...) ignores nil errors and returns nil if there are not errors.

(cherry picked from commit f5a282c13e4245fb29e7e7217889878a4efb99ce)
This commit is contained in:
Ralf Haferkamp
2024-02-28 16:22:06 +01:00
parent 696b7b7a8d
commit 92b1f768b4

View File

@@ -118,13 +118,7 @@ func (s DrivesDriveItemService) UnmountShare(ctx context.Context, resourceID sto
}
}
// We call it a success if all shares could successfully be rejected, otherwise
// we return an error
if len(errs) != 0 {
return errors.Join(errs...)
}
return nil
return errors.Join(errs...)
}
// MountShare mounts a share