cgroups: fix to return errno in a failure path