Staging: rtlwifi: Replace return type
authorMadhumitha Prabakaran <madhumithabiw@gmail.com>
Fri, 19 Apr 2019 21:32:56 +0000 (16:32 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 20 Apr 2019 21:04:49 +0000 (23:04 +0200)
Replace return type and remove the respective assignment.

Issue found by Coccinelle.

Signed-off-by: Madhumitha Prabakaran <madhumithabiw@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtlwifi/core.c

index 2cce653..1e4e858 100644 (file)
@@ -377,9 +377,7 @@ static u16 _calculate_wol_pattern_crc(u8 *pattern, u16 len)
        for (i = 0; i < len; i++)
                crc = crc16_ccitt(pattern[i], crc);
 
-       crc = ~crc;
-
-       return crc;
+       return ~crc;
 }
 
 static void _rtl_add_wowlan_patterns(struct ieee80211_hw *hw,