SELinux: standardize return code handling in selinuxfs.c
authorEric Paris <eparis@redhat.com>
Tue, 23 Nov 2010 16:40:08 +0000 (11:40 -0500)
committerEric Paris <eparis@redhat.com>
Tue, 30 Nov 2010 22:28:57 +0000 (17:28 -0500)
commit4b02b524487622ce1cf472123899520b583f47dc
tree58802e2968852cb1eb0f8f6303fbfaf3d85ecc53
parentb77a493b1dc8010245feeac001e5c7ed0988678f
SELinux: standardize return code handling in selinuxfs.c

selinuxfs.c has lots of different standards on how to handle return paths on
error.  For the most part transition to

rc=errno
if (failure)
goto out;
[...]
out:
cleanup()
return rc;

Instead of doing cleanup mid function, or having multiple returns or other
options.  This doesn't do that for every function, but most of the complex
functions which have cleanup routines on error.

Signed-off-by: Eric Paris <eparis@redhat.com>
security/selinux/ss/services.c