From 8ffca9eae662004016a6d60a2a79ce93f81f150e Mon Sep 17 00:00:00 2001 From: Peter Senna Tschudin Date: Tue, 20 May 2014 12:33:41 +0200 Subject: staging: r8712u: Remove useless return variables This patch remove variables that are initialized with a constant, are never updated, and are only used as parameter of return. Return the constant instead of using a variable. Verified by compilation only. The coccinelle script that find and fixes this issue is: // @@ type T; constant C; identifier ret; @@ - T ret = C; ... when != ret - return ret; + return C; // Signed-off-by: Peter Senna Tschudin Signed-off-by: Greg Kroah-Hartman --- drivers/staging/rtl8712/rtl871x_recv.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'drivers/staging/rtl8712/rtl871x_recv.c') diff --git a/drivers/staging/rtl8712/rtl871x_recv.c b/drivers/staging/rtl8712/rtl871x_recv.c index 274c359279ef..4ac4a1b44d2a 100644 --- a/drivers/staging/rtl8712/rtl871x_recv.c +++ b/drivers/staging/rtl8712/rtl871x_recv.c @@ -605,8 +605,6 @@ sint r8712_wlanhdr_to_ethhdr(union recv_frame *precvframe) u8 bsnaphdr; u8 *psnap_type; struct ieee80211_snap_hdr *psnap; - - sint ret = _SUCCESS; struct _adapter *adapter = precvframe->u.hdr.adapter; struct mlme_priv *pmlmepriv = &adapter->mlmepriv; @@ -653,7 +651,7 @@ sint r8712_wlanhdr_to_ethhdr(union recv_frame *precvframe) len = htons(len); memcpy(ptr + 12, &len, 2); } - return ret; + return _SUCCESS; } s32 r8712_recv_entry(union recv_frame *precvframe) -- cgit v1.2.3