drm/tests/drm_kunit_helpers: Place correct function name in the comment header
[platform/kernel/linux-rpi.git] / drivers / firewire / net.c
index 538bd67..7a4d1a4 100644 (file)
@@ -479,7 +479,7 @@ static int fwnet_finish_incoming_packet(struct net_device *net,
                                        struct sk_buff *skb, u16 source_node_id,
                                        bool is_broadcast, u16 ether_type)
 {
-       int status;
+       int status, len;
 
        switch (ether_type) {
        case ETH_P_ARP:
@@ -533,13 +533,15 @@ static int fwnet_finish_incoming_packet(struct net_device *net,
                }
                skb->protocol = protocol;
        }
+
+       len = skb->len;
        status = netif_rx(skb);
        if (status == NET_RX_DROP) {
                net->stats.rx_errors++;
                net->stats.rx_dropped++;
        } else {
                net->stats.rx_packets++;
-               net->stats.rx_bytes += skb->len;
+               net->stats.rx_bytes += len;
        }
 
        return 0;