Skip to content

Commit 5ea33af

Browse files
cgzonespcmoore
authored andcommitted
selinux: drop return statement at end of void functions
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>
1 parent 3eb8eaf commit 5ea33af

5 files changed

Lines changed: 0 additions & 8 deletions

File tree

security/selinux/hooks.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3284,8 +3284,6 @@ static void selinux_inode_post_setxattr(struct dentry *dentry, const char *name,
32843284
isec->sid = newsid;
32853285
isec->initialized = LABEL_INITIALIZED;
32863286
spin_unlock(&isec->lock);
3287-
3288-
return;
32893287
}
32903288

32913289
static int selinux_inode_getxattr(struct dentry *dentry, const char *name)

security/selinux/ss/conditional.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -566,8 +566,6 @@ void cond_compute_xperms(struct avtab *ctab, struct avtab_key *key,
566566
if (node->key.specified & AVTAB_ENABLED)
567567
services_compute_xperms_decision(xpermd, node);
568568
}
569-
return;
570-
571569
}
572570
/* Determine whether additional permissions are granted by the conditional
573571
* av table, and if so, add them to the result

security/selinux/ss/ebitmap.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,6 @@ void ebitmap_destroy(struct ebitmap *e)
359359

360360
e->highbit = 0;
361361
e->node = NULL;
362-
return;
363362
}
364363

365364
int ebitmap_read(struct ebitmap *e, void *fp)

security/selinux/ss/mls.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,6 @@ void mls_sid_to_context(struct policydb *p,
156156
}
157157

158158
*scontext = scontextp;
159-
return;
160159
}
161160

162161
int mls_level_isvalid(struct policydb *p, struct mls_level *l)

security/selinux/ss/services.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -529,8 +529,6 @@ static void security_dump_masked_av(struct policydb *policydb,
529529
/* release scontext/tcontext */
530530
kfree(tcontext_name);
531531
kfree(scontext_name);
532-
533-
return;
534532
}
535533

536534
/*

0 commit comments

Comments
 (0)