Skip to content

Commit 1ca86ac

Browse files
Yanwei Gaomicah-morton
authored andcommitted
LSM: SafeSetID: Fix code specification by scripts/checkpatch.pl
First, the code is found to be irregular through checkpatch.pl. Then I found break is really useless here. Signed-off-by: Yanwei Gao <[email protected]> Signed-off-by: Micah Morton <[email protected]>
1 parent 9f4ad9e commit 1ca86ac

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

security/safesetid/lsm.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,6 @@ static int safesetid_security_capable(const struct cred *cred,
125125
pr_warn("Operation requires CAP_SETUID, which is not available to UID %u for operations besides approved set*uid transitions\n",
126126
__kuid_val(cred->uid));
127127
return -EPERM;
128-
break;
129128
case CAP_SETGID:
130129
/*
131130
* If no policy applies to this task, allow the use of CAP_SETGID for
@@ -140,11 +139,9 @@ static int safesetid_security_capable(const struct cred *cred,
140139
pr_warn("Operation requires CAP_SETGID, which is not available to GID %u for operations besides approved set*gid transitions\n",
141140
__kuid_val(cred->uid));
142141
return -EPERM;
143-
break;
144142
default:
145143
/* Error, the only capabilities were checking for is CAP_SETUID/GID */
146144
return 0;
147-
break;
148145
}
149146
return 0;
150147
}

0 commit comments

Comments
 (0)