[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240701014720.2547856-1-quic_yijiyang@quicinc.com>
Date: Mon, 1 Jul 2024 09:47:20 +0800
From: YijieYang <quic_yijiyang@...cinc.com>
To: <vkoul@...nel.org>, <alexandre.torgue@...s.st.com>, <joabreu@...opsys.com>,
<davem@...emloft.net>, <edumazet@...gle.com>, <kuba@...nel.org>,
<pabeni@...hat.com>, <mcoquelin.stm32@...il.com>,
<bartosz.golaszewski@...aro.org>, <netdev@...r.kernel.org>,
<linux-arm-msm@...r.kernel.org>,
<linux-stm32@...md-mailman.stormreply.com>,
<linux-arm-kernel@...ts.infradead.org>, <linux-kernel@...r.kernel.org>
CC: <kernel@...cinc.com>, <quic_tengfan@...cinc.com>,
<quic_aiquny@...cinc.com>, <quic_jiegan@...cinc.com>,
<quic_yijiyang@...cinc.com>, <stable@...r.kernel.org>
Subject: [PATCH] net: stmmac: dwmac-qcom-ethqos: fix error array size
From: Yijie Yang <quic_yijiyang@...cinc.com>
Correct member @num_por with size of right array @emac_v4_0_0_por for
struct ethqos_emac_driver_data @emac_v4_0_0_data.
Cc: stable@...r.kernel.org
Fixes: 8c4d92e82d50 ("net: stmmac: dwmac-qcom-ethqos: add support for emac4 on sa8775p platforms")
Signed-off-by: Yijie Yang <quic_yijiyang@...cinc.com>
---
drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c
index 80eb72bc6311..e8a1701cdb7c 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c
@@ -272,7 +272,7 @@ static const struct ethqos_emac_por emac_v4_0_0_por[] = {
static const struct ethqos_emac_driver_data emac_v4_0_0_data = {
.por = emac_v4_0_0_por,
- .num_por = ARRAY_SIZE(emac_v3_0_0_por),
+ .num_por = ARRAY_SIZE(emac_v4_0_0_por),
.rgmii_config_loopback_en = false,
.has_emac_ge_3 = true,
.link_clk_name = "phyaux",
base-commit: 0fc4bfab2cd45f9acb86c4f04b5191e114e901ed
--
2.34.1
Powered by blists - more mailing lists