cgroup: restructure the failure path in cgroup_write_event_control()
authorLi Zefan <lizefan@huawei.com>
Thu, 1 Aug 2013 01:51:47 +0000 (09:51 +0800)
committerTejun Heo <tj@kernel.org>
Thu, 1 Aug 2013 13:29:41 +0000 (09:29 -0400)
commit876ede8b2b9880615be0de3ec7b8afd0a1786e76
treeb2c238a5939a6daf9f43b6eba1b1ceaf3dc2c372
parente14880f7bb7e0dc0933af304998371dd543ceb40
cgroup: restructure the failure path in cgroup_write_event_control()

It uses a single label and checks the validity of each pointer. This
is err-prone, and actually we had a bug because one of the check was
insufficient.

Use multi lables as we do in other places.

v2:
- drop initializations of local variables.

Signed-off-by: Li Zefan <lizefan@huawei.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
kernel/cgroup.c