From 26e2fa765cd7325906ef8bbee366c74e24b3d768 Mon Sep 17 00:00:00 2001 From: Julia Lawall Date: Mon, 19 May 2014 06:31:12 +0200 Subject: [PATCH] staging: rtl8192e: make return of 0 explicit Delete unnecessary use of a local variable to immediately return 0. A simplified version of the semantic patch that fixes this problem is as follows: (http://coccinelle.lip6.fr/) // @r exists@ local idexpression ret; expression e; position p; @@ -ret = 0; ... when != ret = e return - ret + 0 ; // Signed-off-by: Julia Lawall Signed-off-by: Greg Kroah-Hartman --- drivers/staging/rtl8192e/rtl8192e/rtl_core.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c index 356d5217e9d4..2920e406030a 100644 --- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c +++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c @@ -1915,8 +1915,7 @@ int rtl8192_hard_start_xmit(struct sk_buff *skb, struct net_device *dev) memcpy((unsigned char *)(skb->cb), &dev, sizeof(dev)); if (queue_index == TXCMD_QUEUE) { rtl8192_tx_cmd(dev, skb); - ret = 0; - return ret; + return 0; } else { tcb_desc->RATRIndex = 7; tcb_desc->bTxDisableRateFallBack = 1;