staging: rtl8192u: ieee80211_crypt: Remove unnecessary else after return

Author: Bhaktipriya Shridhar <bhaktipriya96@gmail.com>

This patch fixes the checkpatch warning that else is not generally
useful after a break or return.

This was done using Coccinelle:
@@
expression e2;
statement s1;
@@
if(e2) { ... return ...; }
-else
         s1

Signed-off-by: Bhaktipriya Shridhar 
Signed-off-by: Greg Kroah-Hartman 
---
 drivers/staging/rtl8192u/ieee80211/ieee80211_crypt.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
 
diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt.c b/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt.c
index 3995620..9cf90d0 100644
--- a/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt.c
+++ b/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt.c
@@ -176,8 +176,7 @@ struct ieee80211_crypto_ops *ieee80211_get_crypto_ops(const char *name)
 
 	if (found_alg)
 		return found_alg->ops;
-	else
-		return NULL;
+	return NULL;
 }
BtrLinux
Privacy Overview

This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.