From: Ioana Radulescu Date: Mon, 7 Oct 2019 11:38:27 +0000 (+0300) Subject: dpaa2-eth: Fix minor bug in ethtool stats reporting X-Git-Tag: v5.15~5092^2~394^2~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4b177f065e7ec37399b18e18412a8c7b75f8f299;p=platform%2Fkernel%2Flinux-starfive.git dpaa2-eth: Fix minor bug in ethtool stats reporting Don't print error message for a successful return value. Fixes: d84c3a4ded96 ("dpaa2-eth: Add new DPNI statistics counters") Signed-off-by: Ioana Radulescu Signed-off-by: Ioana Ciornei Signed-off-by: David S. Miller --- diff --git a/drivers/net/ethernet/freescale/dpaa2/dpaa2-ethtool.c b/drivers/net/ethernet/freescale/dpaa2/dpaa2-ethtool.c index 0aa1c34..dc9a6c3 100644 --- a/drivers/net/ethernet/freescale/dpaa2/dpaa2-ethtool.c +++ b/drivers/net/ethernet/freescale/dpaa2/dpaa2-ethtool.c @@ -216,7 +216,7 @@ static void dpaa2_eth_get_ethtool_stats(struct net_device *net_dev, if (err == -EINVAL) /* Older firmware versions don't support all pages */ memset(&dpni_stats, 0, sizeof(dpni_stats)); - else + else if (err) netdev_warn(net_dev, "dpni_get_stats(%d) failed\n", j); num_cnt = dpni_stats_page_size[j] / sizeof(u64);