]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
Staging: rtl8192e: Remove variable ChkLength
authorTree Davies <tdavies@darkphysics.net>
Tue, 21 May 2024 03:17:06 +0000 (20:17 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 4 Jun 2024 11:16:20 +0000 (13:16 +0200)
Remove variable ChkLength which fixes warning Avoid CamelCase,
and use llc_offset in its place.

Signed-off-by: Tree Davies <tdavies@darkphysics.net>
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org>
Link: https://lore.kernel.org/r/20240521031718.17852-20-tdavies@darkphysics.net
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8192e/rtllib_rx.c

index 52fbbbaf30b0b79ccb3b48e7daf3b1a1ae56a123..3a637731506c2917c3e0fcedf973a00f6b8881d3 100644 (file)
@@ -729,7 +729,6 @@ static u8 parse_subframe(struct rtllib_device *ieee, struct sk_buff *skb,
        u16             fc = le16_to_cpu(hdr->frame_control);
 
        u16             llc_offset = sizeof(struct ieee80211_hdr_3addr);
-       u16             ChkLength;
        bool            is_aggregate_frame = false;
        u16             nSubframe_Length;
        u8              pad_len = 0;
@@ -746,9 +745,7 @@ static u8 parse_subframe(struct rtllib_device *ieee, struct sk_buff *skb,
        if (rx_stats->contain_htc)
                llc_offset += sHTCLng;
 
-       ChkLength = llc_offset;
-
-       if (skb->len <= ChkLength)
+       if (skb->len <= llc_offset)
                return 0;
 
        skb_pull(skb, llc_offset);