diff --git a/bcm/bcm.c b/bcm/bcm.c index 59f00c9bb34a730bd7698f86b3ff9e35bbe87660..65a54ded24bbafba7dce87fe6d6c44ec4ec28b33 100644 --- a/bcm/bcm.c +++ b/bcm/bcm.c @@ -286,6 +286,8 @@ int bcm_eth_get_stats(const char *ifname, struct eth_stats *s) /* get from proc first */ ret_proc = bcm_eth_get_stats_from_proc(ifname, s); + if (!ret_proc) + return 0; memset(&data, 0, sizeof(struct ethswctl_data)); ret = bcm_eth_get_unit_port(ifname, &unit, &port);