]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
staging: lustre: lustre: Remove unnecessary else after return
authorJanani Ravichandran <janani.rvchndrn@gmail.com>
Thu, 18 Feb 2016 21:52:45 +0000 (16:52 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 20 Feb 2016 22:39:54 +0000 (14:39 -0800)
commit7d51a7dab7486a5961ca30909531f70155043a31
tree4bcfc272af073f1f81c3e086d04dd2cb7b82c638
parent496baea013b6c9ef7eaf80facc50b4317e5cd39c
staging: lustre: lustre: Remove unnecessary else after return

Else is unnecessary when there is a return statement in the
corresponding if block. Coccinelle patch used:

@rule1@
expression e1;
@@

if (e1) { ... return ...; }
-       else{
        ...
-       }

@rule2@
expression e2;
statement s1;
@@

if(e2) { ... return ...; }
-       else
s1

Signed-off-by: Janani Ravichandran <janani.rvchndrn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/lustre/lustre/libcfs/linux/linux-crypto.c
drivers/staging/lustre/lustre/libcfs/linux/linux-tracefile.c
drivers/staging/lustre/lustre/lov/lov_obd.c