Re: [Patch] selinux: remove a useless return

From: Eric Paris
Date: Thu Dec 03 2009 - 09:24:36 EST


On Thu, 2009-12-03 at 03:48 -0500, Amerigo Wang wrote:
> The last return is unreachable, remove the 'return'
> in default, let it fall through.
>
> Signed-off-by: WANG Cong <amwang@xxxxxxxxxx>
> Cc: James Morris <jmorris@xxxxxxxxx>
> Cc: Eric Paris <eparis@xxxxxxxxxxxxxx>

Acked-by: Eric Paris <eparis@xxxxxxxxxx>

>
> ---
>
> diff --git a/security/selinux/ss/mls.c b/security/selinux/ss/mls.c
> index b5407f1..718823d 100644
> --- a/security/selinux/ss/mls.c
> +++ b/security/selinux/ss/mls.c
> @@ -542,7 +542,7 @@ int mls_compute_sid(struct context *scontext,
> /* Use the process effective MLS attributes. */
> return mls_context_cpy_low(newcontext, scontext);
> default:
> - return -EINVAL;
> + /* Fallthrough */
> }
> return -EINVAL;
> }


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/