From: Yanwei Gao Date: Wed, 10 Mar 2021 06:52:12 +0000 (+0000) Subject: LSM: SafeSetID: Fix code specification by scripts/checkpatch.pl X-Git-Tag: v5.15~1192^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1ca86ac1ec8d201478e9616565d4df5d51595cfc;p=platform%2Fkernel%2Flinux-starfive.git 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 Signed-off-by: Micah Morton --- diff --git a/security/safesetid/lsm.c b/security/safesetid/lsm.c index 8a176b6..1079c6d 100644 --- a/security/safesetid/lsm.c +++ b/security/safesetid/lsm.c @@ -125,7 +125,6 @@ static int safesetid_security_capable(const struct cred *cred, pr_warn("Operation requires CAP_SETUID, which is not available to UID %u for operations besides approved set*uid transitions\n", __kuid_val(cred->uid)); return -EPERM; - break; case CAP_SETGID: /* * 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, pr_warn("Operation requires CAP_SETGID, which is not available to GID %u for operations besides approved set*gid transitions\n", __kuid_val(cred->uid)); return -EPERM; - break; default: /* Error, the only capabilities were checking for is CAP_SETUID/GID */ return 0; - break; } return 0; }