diff options
| author | 2025-10-25 20:35:47 +0200 | |
|---|---|---|
| committer | 2025-10-29 18:58:01 -0700 | |
| commit | cf35f4347ddd42ceca156e57a87ec489788f1bd7 (patch) | |
| tree | 3e5174eb945337b5ea41be466d07e3d2785b7b16 /drivers/acpi/cppc_acpi.c | |
| parent | net: wwan: Remove redundant pm_runtime_mark_last_busy() calls (diff) | |
| download | wireguard-linux-cf35f4347ddd42ceca156e57a87ec489788f1bd7.tar.xz wireguard-linux-cf35f4347ddd42ceca156e57a87ec489788f1bd7.zip | |
net: stmmac: mdio: fix incorrect phy address check
max_addr is the max number of addresses, not the highest possible address,
therefore check phydev->mdio.addr > max_addr isn't correct.
To fix this change the semantics of max_addr, so that it represents
the highest possible address. IMO this is also a little bit more intuitive
wrt name max_addr.
Fixes: 4a107a0e8361 ("net: stmmac: mdio: use phy_find_first to simplify stmmac_mdio_register")
Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
Reported-by: Simon Horman <horms@kernel.org>
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Link: https://patch.msgid.link/e869999b-2d4b-4dc1-9890-c2d3d1e8d0f8@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers/acpi/cppc_acpi.c')
0 files changed, 0 insertions, 0 deletions
