selinux: drop return statement at end of void functions
authorChristian Göttsche <cgzones@googlemail.com>
Thu, 17 Feb 2022 14:21:29 +0000 (15:21 +0100)
committerPaul Moore <paul@paul-moore.com>
Fri, 18 Feb 2022 15:42:12 +0000 (10:42 -0500)
Those return statements at the end of a void function are redundant.

Reported by clang-tidy [readability-redundant-control-flow]

Signed-off-by: Christian Göttsche <cgzones@googlemail.com>
Signed-off-by: Paul Moore <paul@paul-moore.com>
security/selinux/hooks.c
security/selinux/ss/conditional.c
security/selinux/ss/ebitmap.c
security/selinux/ss/mls.c
security/selinux/ss/services.c

index dafabb4dcc6402978823e977255e13fd4f11485d..1e69f88eb326a4e9bbbb05d917e60f3ce5798847 100644 (file)
@@ -3284,8 +3284,6 @@ static void selinux_inode_post_setxattr(struct dentry *dentry, const char *name,
        isec->sid = newsid;
        isec->initialized = LABEL_INITIALIZED;
        spin_unlock(&isec->lock);
-
-       return;
 }
 
 static int selinux_inode_getxattr(struct dentry *dentry, const char *name)
index 2ec6e5cd25d9b6a057597acc767811f15a18823b..c46c419af512e873c40554e13a80493482b4d6c2 100644 (file)
@@ -566,8 +566,6 @@ void cond_compute_xperms(struct avtab *ctab, struct avtab_key *key,
                if (node->key.specified & AVTAB_ENABLED)
                        services_compute_xperms_decision(xpermd, node);
        }
-       return;
-
 }
 /* Determine whether additional permissions are granted by the conditional
  * av table, and if so, add them to the result
index 61fcbb8d0f8808525d7cb87e10e53915c726544d..abde349c8321728306b9e677a6d569e6fca4e7e9 100644 (file)
@@ -359,7 +359,6 @@ void ebitmap_destroy(struct ebitmap *e)
 
        e->highbit = 0;
        e->node = NULL;
-       return;
 }
 
 int ebitmap_read(struct ebitmap *e, void *fp)
index 3f5fd124342c9a2c527edb260b6db9bb8791b269..99571b19d4a9e9ea105172dd1881a70591798474 100644 (file)
@@ -156,7 +156,6 @@ void mls_sid_to_context(struct policydb *p,
        }
 
        *scontext = scontextp;
-       return;
 }
 
 int mls_level_isvalid(struct policydb *p, struct mls_level *l)
index 2f8db93e53b29de481adbcc166ed0215cd325b6a..6901dc07680de727bc924b9054d87492972b56f0 100644 (file)
@@ -529,8 +529,6 @@ out:
        /* release scontext/tcontext */
        kfree(tcontext_name);
        kfree(scontext_name);
-
-       return;
 }
 
 /*