]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
ehea: Fix a copy-paste err in ehea_init_port_res
authorYueHaibing <yuehaibing@huawei.com>
Wed, 3 Apr 2019 07:47:59 +0000 (15:47 +0800)
committerBen Hutchings <ben@decadent.org.uk>
Mon, 23 Sep 2019 20:11:38 +0000 (21:11 +0100)
commit c8f191282f819ab4e9b47b22a65c6c29734cefce upstream.

pr->tx_bytes should be assigned to tx_bytes other than
rx_bytes.

Reported-by: Hulk Robot <hulkci@huawei.com>
Fixes: ce45b873028f ("ehea: Fixing statistics")
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Reviewed-by: Mukesh Ojha <mojha@codeaurora.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
drivers/net/ethernet/ibm/ehea/ehea_main.c

index 50f9f98c065737fc2776f10f1f7e3912b3ece220..87f12766435cb67cd8e8f354e19701647e270706 100644 (file)
@@ -1476,7 +1476,7 @@ static int ehea_init_port_res(struct ehea_port *port, struct ehea_port_res *pr,
 
        memset(pr, 0, sizeof(struct ehea_port_res));
 
-       pr->tx_bytes = rx_bytes;
+       pr->tx_bytes = tx_bytes;
        pr->tx_packets = tx_packets;
        pr->rx_bytes = rx_bytes;
        pr->rx_packets = rx_packets;