mirror-linux/drivers/net
Heiner Kallweit 5bd6174693 net: stmmac: fix invalid call to mdiobus_get_phy()
[ Upstream commit 1f3bd64ad9 ]

In a number of cases the driver assigns a default value of -1 to
priv->plat->phy_addr. This may result in calling mdiobus_get_phy()
with addr parameter being -1. Therefore check for this scenario and
bail out before calling mdiobus_get_phy().

Fixes: 42e87024f7 ("net: stmmac: Fix case when PHY handle is not present")
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Link: https://lore.kernel.org/r/669f9671-ecd1-a41b-2727-7b73e3003985@gmail.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-02-01 08:34:20 +01:00
..
appletalk
arcnet
bonding drivers/net/bonding/bond_3ad: return when there's no aggregator 2023-01-12 12:02:28 +01:00
caif
can can: tcan4x5x: Fix use of register error status mask 2022-12-31 13:32:27 +01:00
dsa net: dsa: qca8k: fix wrong length value for mgmt eth packet 2023-01-12 12:02:47 +01:00
ethernet net: stmmac: fix invalid call to mdiobus_get_phy() 2023-02-01 08:34:20 +01:00
fddi net: defxx: Fix missing err handling in dfx_init() 2022-12-31 13:32:26 +01:00
fjes
hamradio hamradio: baycom_epp: Fix return type of baycom_send_packet() 2022-12-31 13:33:00 +01:00
hippi
hyperv
ieee802154
ipa
ipvlan
mctp mctp: serial: Fix starting value for frame check sequence 2022-12-31 13:32:56 +01:00
mdio
netdevsim
pcs
phy net: mdio: validate parameter addr in mdiobus_get_phy() 2023-02-01 08:34:19 +01:00
plip
ppp ppp: associate skb with a device at tx 2022-12-31 13:33:02 +01:00
pse-pd
slip
team
usb net: usb: sr9700: Handle negative len 2023-02-01 08:34:19 +01:00
vmxnet3 vmxnet3: correctly report csum_level for encapsulated packet 2023-01-12 12:01:58 +01:00
vxlan vxlan: Fix memory leaks in error path 2023-01-12 12:02:25 +01:00
wan net: wan: Add checks for NULL for utdm in undo_uhdlc_init and unmap_si_regs 2023-02-01 08:34:17 +01:00
wireguard
wireless wifi: rndis_wlan: Prevent buffer overflow in rndis_query_oid 2023-02-01 08:34:18 +01:00
wwan
xen-netback
Kconfig
LICENSE.SRC
Makefile
Space.c
amt.c
bareudp.c
dummy.c
eql.c
geneve.c
gtp.c
ifb.c
loopback.c
macsec.c net: macsec: fix net device access prior to holding a lock 2022-12-31 13:32:53 +01:00
macvlan.c
macvtap.c
mdio.c
mhi_net.c
mii.c
net_failover.c
netconsole.c
nlmon.c
ntb_netdev.c ntb_netdev: Use dev_kfree_skb_any() in interrupt context 2022-12-31 13:32:28 +01:00
rionet.c
sb1000.c
sungem_phy.c
tap.c
thunderbolt.c
tun.c
veth.c veth: Fix race with AF_XDP exposing old or uninitialized descriptors 2023-01-12 12:01:59 +01:00
virtio_net.c
vrf.c net: vrf: determine the dst using the original ifindex for multicast 2023-01-12 12:01:57 +01:00
vsockmon.c
xen-netfront.c