Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7d51a7da authored by Janani Ravichandran's avatar Janani Ravichandran Committed by Greg Kroah-Hartman
Browse files

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: default avatarJanani Ravichandran <janani.rvchndrn@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 496baea0
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -233,7 +233,6 @@ int cfs_crypto_hash_speed(unsigned char hash_alg)
{
	if (hash_alg < CFS_HASH_ALG_MAX)
		return cfs_crypto_hash_speeds[hash_alg];
	else
	return -1;
}
EXPORT_SYMBOL(cfs_crypto_hash_speed);
+2 −3
Original line number Diff line number Diff line
@@ -134,9 +134,8 @@ enum cfs_trace_buf_type cfs_trace_buf_idx_get(void)
{
	if (in_irq())
		return CFS_TCD_TYPE_IRQ;
	else if (in_softirq())
	if (in_softirq())
		return CFS_TCD_TYPE_SOFTIRQ;
	else
	return CFS_TCD_TYPE_PROC;
}

+2 −1
Original line number Diff line number Diff line
@@ -1550,7 +1550,8 @@ static int lov_iocontrol(unsigned int cmd, struct obd_export *exp, int len,
					    len, karg, uarg);
			if (err == -ENODATA && cmd == OBD_IOC_POLL_QUOTACHECK) {
				return err;
			} else if (err) {
			}
			if (err) {
				if (lov->lov_tgts[i]->ltd_active) {
					CDEBUG(err == -ENOTTY ?
					       D_IOCTL : D_WARNING,