]> www.infradead.org Git - nvme.git/commitdiff
net: stmmac: dwmac-qcom-ethqos: fix error array size
authorYijie Yang <quic_yijiyang@quicinc.com>
Mon, 1 Jul 2024 01:47:20 +0000 (09:47 +0800)
committerPaolo Abeni <pabeni@redhat.com>
Tue, 2 Jul 2024 13:37:12 +0000 (15:37 +0200)
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@vger.kernel.org
Fixes: 8c4d92e82d50 ("net: stmmac: dwmac-qcom-ethqos: add support for emac4 on sa8775p platforms")
Signed-off-by: Yijie Yang <quic_yijiyang@quicinc.com>
Reviewed-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Link: https://patch.msgid.link/20240701014720.2547856-1-quic_yijiyang@quicinc.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c

index 65d7370b47d579600a1a779e17439fbd56763b9b..466c4002f00d44e6be8f4c710fd9f7e3c3fd0e7f 100644 (file)
@@ -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",