summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--drivers/net/dsa/sja1105/sja1105_ethtool.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/net/dsa/sja1105/sja1105_ethtool.c b/drivers/net/dsa/sja1105/sja1105_ethtool.c
index 46d22be31309..ab581a28cd41 100644
--- a/drivers/net/dsa/sja1105/sja1105_ethtool.c
+++ b/drivers/net/dsa/sja1105/sja1105_ethtool.c
@@ -313,9 +313,11 @@ static char sja1105pqrs_extra_port_stats[][ETH_GSTRING_LEN] = {
void sja1105_get_ethtool_stats(struct dsa_switch *ds, int port, u64 *data)
{
struct sja1105_private *priv = ds->priv;
- struct sja1105_port_status status = {0};
+ struct sja1105_port_status status;
int rc, i, k = 0;
+ memset(&status, 0, sizeof(status));
+
rc = sja1105_port_status_get(priv, &status, port);
if (rc < 0) {
dev_err(ds->dev, "Failed to read port %d counters: %d\n",