ppc: use defer for waitgroup done