]> git.baikalelectronics.ru Git - kernel.git/commit
net: ethernet: stmmac: fix write to sgmii_adapter_base
authorDinh Nguyen <dinguyen@kernel.org>
Wed, 20 Apr 2022 15:23:45 +0000 (10:23 -0500)
committerJakub Kicinski <kuba@kernel.org>
Fri, 22 Apr 2022 23:31:56 +0000 (16:31 -0700)
commitf7559b7eb474aa67bba0d4c720879edff8e89c4a
treedb3611589fd72c27123efaf1883d88bc0bb7952b
parent58fae795f341d9741e315852bd3b6b4273929b61
net: ethernet: stmmac: fix write to sgmii_adapter_base

I made a mistake with the commit de8c069a3064 ("net: ethernet: stmmac:
fix altr_tse_pcs function when using a fixed-link"). I should have
tested against both scenario of having a SGMII interface and one
without.

Without the SGMII PCS TSE adpater, the sgmii_adapter_base address is
NULL, thus a write to this address will fail.

Cc: stable@vger.kernel.org
Fixes: de8c069a3064 ("net: ethernet: stmmac: fix altr_tse_pcs function when using a fixed-link")
Signed-off-by: Dinh Nguyen <dinguyen@kernel.org>
Link: https://lore.kernel.org/r/20220420152345.27415-1-dinguyen@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c