[PATCH] staging: rtl8192e: Remove unnecessary use of goto

rahul.g4 at samsung.com rahul.g4 at samsung.com
Tue Dec 13 08:11:24 UTC 2016


From: Rahul Goyal <rahul.g4 at samsung.com>

This patch removes unnecessary goto branch
when memory unallocated.

Signed-off-by: Rahul Goyal <rahul.g4 at samsung.com>
---
 drivers/staging/rtl8192e/rtllib_crypt_wep.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/rtl8192e/rtllib_crypt_wep.c b/drivers/staging/rtl8192e/rtllib_crypt_wep.c
index b3343a5..2b1d2709 100644
--- a/drivers/staging/rtl8192e/rtllib_crypt_wep.c
+++ b/drivers/staging/rtl8192e/rtllib_crypt_wep.c
@@ -37,8 +37,8 @@ static void *prism2_wep_init(int keyidx)
 	struct prism2_wep_data *priv;
 
 	priv = kzalloc(sizeof(*priv), GFP_ATOMIC);
-	if (priv == NULL)
-		goto fail;
+	if (!priv)
+		return NULL;
 	priv->key_idx = keyidx;
 
 	priv->tx_tfm = crypto_alloc_skcipher("ecb(arc4)", 0, CRYPTO_ALG_ASYNC);
-- 
1.7.9.5



More information about the devel mailing list