Robert Hancock 6bb9e376c2 net: dsa: microchip: Don't try to read stats for unused ports
If some of the switch ports were not listed in the device tree, due to
being unused, the ksz_mib_read_work function ended up accessing a NULL
dp->slave pointer and causing an oops. Skip checking statistics for any
unused ports.

Fixes: 7c6ff470aa867f53 ("net: dsa: microchip: add MIB counter reading support")
Signed-off-by: Robert Hancock <hancock@sedsystems.ca>
Reviewed-by: Vivien Didelot <vivien.didelot@gmail.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2019-06-14 19:10:03 -07:00
..
2019-05-31 10:38:35 -07:00
2019-06-02 09:27:44 -07:00
2019-05-31 08:34:32 -07:00
2019-05-25 10:11:23 -07:00
2019-05-31 08:34:32 -07:00
2019-05-31 08:34:32 -07:00
2019-05-31 08:34:32 -07:00
2019-06-07 09:25:27 -07:00
2019-05-31 08:34:32 -07:00
2019-06-02 10:14:25 -07:00
2019-05-31 08:34:32 -07:00
2019-05-25 10:11:23 -07:00
2019-05-24 16:02:14 -07:00
2019-06-02 09:26:34 -07:00
2019-05-27 11:08:23 -04:00
2019-05-31 08:34:32 -07:00
2019-05-31 10:53:34 -07:00