Skip to content

Commit 26e2fa7

Browse files
JuliaLawallgregkh
authored andcommitted
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/) // <smpl> @r exists@ local idexpression ret; expression e; position p; @@ -ret = 0; ... when != ret = e return - ret + 0 ; // </smpl> Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 9cdf838 commit 26e2fa7

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

‎drivers/staging/rtl8192e/rtl8192e/rtl_core.c‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1915,8 +1915,7 @@ int rtl8192_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
19151915
memcpy((unsigned char *)(skb->cb), &dev, sizeof(dev));
19161916
if (queue_index == TXCMD_QUEUE) {
19171917
rtl8192_tx_cmd(dev, skb);
1918-
ret = 0;
1919-
return ret;
1918+
return 0;
19201919
} else {
19211920
tcb_desc->RATRIndex = 7;
19221921
tcb_desc->bTxDisableRateFallBack = 1;

0 commit comments

Comments
 (0)