linux/drivers/net/ethernet
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
..
3com net: ethernet: move from strlcpy with unused retval to strscpy 2022-08-31 14:11:26 -07:00
8390 ethernet: 8390: remove unnecessary check of mem 2022-09-29 11:05:23 +02:00
actions net: drop the weight argument from netif_napi_add 2022-09-28 18:57:14 -07:00
adaptec net: ethernet: move from strlcpy with unused retval to strscpy 2022-08-31 14:11:26 -07:00
adi net: ethernet: adi: adin1110: Fix SPI transfers 2022-12-31 13:32:03 +01:00
aeroflex ethernet: aeroflex: fix potential skb leak in greth_init_rings() 2022-12-07 11:45:52 +01:00
agere net: drop the weight argument from netif_napi_add 2022-09-28 18:57:14 -07:00
alacritech net: drop the weight argument from netif_napi_add 2022-09-28 18:57:14 -07:00
allwinner net: ethernet: move from strlcpy with unused retval to strscpy 2022-08-31 14:11:26 -07:00
alteon net: ethernet: move from strlcpy with unused retval to strscpy 2022-08-31 14:11:26 -07:00
altera net: altera_tse: release phylink resources in tse_shutdown() 2022-11-24 09:34:43 +01:00
amazon net: ena: Update NUMA TPH hint register upon NUMA node update 2023-01-12 12:02:19 +01:00
amd amd-xgbe: Delay AN timeout during KR training 2023-02-01 08:34:10 +01:00
apm drivers: net: xgene: disable napi when register irq failed in xgene_enet_open() 2022-11-08 15:15:55 +01:00
apple net: apple: bmac: don't call dev_kfree_skb() under spin_lock_irqsave() 2022-12-31 13:32:27 +01:00
aquantia aquantia: Do not purge addresses when setting the number of rings 2022-11-25 09:28:46 +00:00
arc net: ethernet: move from strlcpy with unused retval to strscpy 2022-08-31 14:11:26 -07:00
asix net: ax88796c: Use skb_put_data() instead of skb_put/memcpy pair 2022-09-29 09:37:29 +02:00
atheros net: ag71xx: call phylink_disconnect_phy if ag71xx_hw_enable() fail in ag71xx_open() 2022-11-15 20:22:12 -08:00
broadcom bnxt: make sure we return pages to the pool 2023-01-18 11:58:32 +01:00
brocade net: bna: Fix spelling mistake "muliple" -> "multiple" 2022-09-30 13:01:16 +01:00
cadence net: macb: Specify PHY PM management done by MAC 2022-10-20 21:12:00 -07:00
calxeda net: drop the weight argument from netif_napi_add 2022-09-28 18:57:14 -07:00
cavium net: thunderx: Fix missing destroy_workqueue of nicvf_rx_mode_wq 2022-12-06 12:41:46 +01:00
chelsio cxgb4vf: shut down the adapter when t4vf_update_port_info() failed in cxgb4vf_open() 2022-11-09 19:30:30 -08:00
cirrus net: drop the weight argument from netif_napi_add 2022-09-28 18:57:14 -07:00
cisco net: drop the weight argument from netif_napi_add 2022-09-28 18:57:14 -07:00
cortina net: drop the weight argument from netif_napi_add 2022-09-28 18:57:14 -07:00
davicom net: dm9051: Fix missing dev_kfree_skb() in dm9051_loop_rx() 2022-11-23 12:43:14 +00:00
dec net: ethernet: move from strlcpy with unused retval to strscpy 2022-08-31 14:11:26 -07:00
dlink net: ethernet: move from strlcpy with unused retval to strscpy 2022-08-31 14:11:26 -07:00
emulex net: drop the weight argument from netif_napi_add 2022-09-28 18:57:14 -07:00
engleder tsnep: Fix rotten packets 2022-11-22 15:47:17 +01:00
ezchip
faraday net: drop the weight argument from netif_napi_add 2022-09-28 18:57:14 -07:00
freescale net: enetc: avoid deadlock in enetc_tx_onestep_tstamp() 2023-02-01 08:34:18 +01:00
fujitsu net: ethernet: move from strlcpy with unused retval to strscpy 2022-08-31 14:11:26 -07:00
fungible net: drop the weight argument from netif_napi_add 2022-09-28 18:57:14 -07:00
google net: drop the weight argument from netif_napi_add 2022-09-28 18:57:14 -07:00
hisilicon net: hns3: fix wrong use of rss size during VF rss config 2023-01-18 11:58:32 +01:00
huawei net: hinic: Fix error handling in hinic_module_init() 2022-11-11 19:57:37 -08:00
i825xx
ibm ibmveth: Reduce default tx queues to 8 2022-11-08 17:46:24 -08:00
intel igc: Fix PPS delta between two synchronized end-points 2023-01-18 11:58:31 +01:00
litex net: ethernet: litex: Fix return type of liteeth_start_xmit 2022-09-19 18:23:39 -07:00
marvell octeontx2-pf: Fix the use of GFP_KERNEL in atomic context on rt 2023-01-24 07:24:43 +01:00
mediatek net: ethernet: mtk_eth_soc: drop packets to WDMA if the ring is full 2022-12-31 13:33:02 +01:00
mellanox net/mlx5: fix missing mutex_unlock in mlx5_fw_fatal_reporter_err_work() 2023-01-24 07:24:44 +01:00
micrel net: ksz884x: fix missing pci_disable_device() on error in pcidev_init() 2022-10-25 19:46:35 -07:00
microchip net: lan966x: add missing fwnode_handle_put() for ports node 2023-02-01 08:34:18 +01:00
microsoft net: mana: Fix race on per-CQ variable napi work_done 2022-12-06 11:21:34 +01:00
moxa net: moxa: fix endianness-related issues from 'sparse' 2022-09-06 10:24:42 +02:00
mscc Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2022-09-29 14:30:51 -07:00
myricom myri10ge: Fix an error handling path in myri10ge_probe() 2022-12-31 13:32:56 +01:00
natsemi net: drop the weight argument from netif_napi_add 2022-09-28 18:57:14 -07:00
neterion ethernet: s2io: don't call dev_kfree_skb() under spin_lock_irqsave() 2022-12-31 13:32:26 +01:00
netronome nfp: correct desc type when header dma len is 4096 2022-12-04 15:41:03 -08:00
ni net: ethernet: nixge: fix NULL dereference 2022-11-28 11:09:51 +00:00
nvidia net: drop the weight argument from netif_napi_add 2022-09-28 18:57:14 -07:00
nxp net: ethernet: move from strlcpy with unused retval to strscpy 2022-08-31 14:11:26 -07:00
oki-semi net: pch_gbe: fix pci device refcount leak while module exiting 2022-11-18 19:40:14 -08:00
packetengines net: ethernet: move from strlcpy with unused retval to strscpy 2022-08-31 14:11:26 -07:00
pasemi net: drop the weight argument from netif_napi_add 2022-09-28 18:57:14 -07:00
pensando net: ionic: Fix error handling in ionic_init_module() 2022-11-14 18:50:53 -08:00
qlogic qed: allow sleep in qed_mcp_trace_dump() 2023-01-12 12:02:32 +01:00
qualcomm net: drop the weight argument from netif_napi_add 2022-09-28 18:57:14 -07:00
rdc r6040: Fix kmemleak in probe and remove 2022-12-31 13:32:54 +01:00
realtek r8169: fix dmar pte write access is not set error 2023-01-24 07:24:31 +01:00
renesas ravb: Fix "failed to switch device to config mode" message during unbind 2023-01-07 11:11:50 +01:00
rocker treewide: use get_random_bytes() when possible 2022-10-11 17:42:58 -06:00
samsung net: drop the weight argument from netif_napi_add 2022-09-28 18:57:14 -07:00
seeq
sfc sfc: fix potential memleak in __ef100_hard_start_xmit() 2022-11-22 11:28:16 +01:00
sgi net: ethernet: move from strlcpy with unused retval to strscpy 2022-08-31 14:11:26 -07:00
silan
sis net: ethernet: move from strlcpy with unused retval to strscpy 2022-08-31 14:11:26 -07:00
smsc net: drop the weight argument from netif_napi_add 2022-09-28 18:57:14 -07:00
socionext net: ethernet: ave: Fix MAC to be in charge of PHY PM 2022-10-26 20:21:34 -07:00
stmicro net: stmmac: fix invalid call to mdiobus_get_phy() 2023-02-01 08:34:20 +01:00
sun sunhme: Uninitialized variable in happy_meal_init() 2022-10-15 11:14:24 +01:00
sunplus eth: sp7021: drop free_netdev() from spl2sw_init_netdev() 2022-11-10 16:27:33 -08:00
synopsys net: drop the weight argument from netif_napi_add 2022-09-28 18:57:14 -07:00
tehuti net: drop the weight argument from netif_napi_add 2022-09-28 18:57:14 -07:00
ti net: ethernet: ti: Fix return type of netcp_ndo_start_xmit() 2022-12-31 13:33:00 +01:00
toshiba net: drop the weight argument from netif_napi_add 2022-09-28 18:57:14 -07:00
tundra ethernet: tundra: free irq when alloc ring failed in tsi108_open() 2022-11-10 15:39:08 +01:00
vertexcom net: vertexcom: mse102x: Silence no spi_device_id warnings 2022-09-26 12:46:16 -07:00
via net: drop the weight argument from netif_napi_add 2022-09-28 18:57:14 -07:00
wangxun net: ngbe: Add build support for ngbe 2022-08-30 12:32:51 +02:00
wiznet net: ethernet: move from strlcpy with unused retval to strscpy 2022-08-31 14:11:26 -07:00
xilinx net: emaclite: don't call dev_kfree_skb() under spin_lock_irqsave() 2022-12-31 13:32:27 +01:00
xircom net: ethernet: move from strlcpy with unused retval to strscpy 2022-08-31 14:11:26 -07:00
xscale net: xscale: Fix return type for implementation of ndo_start_xmit 2022-09-02 21:18:56 -07:00
dnet.c net: ethernet: dnet: don't call dev_kfree_skb() under spin_lock_irqsave() 2022-12-31 13:32:27 +01:00
dnet.h
ec_bhf.c
ethoc.c net: drop the weight argument from netif_napi_add 2022-09-28 18:57:14 -07:00
fealnx.c net: ethernet: move from strlcpy with unused retval to strscpy 2022-08-31 14:11:26 -07:00
jme.c net: drop the weight argument from netif_napi_add 2022-09-28 18:57:14 -07:00
jme.h
Kconfig net: ethernet: adi: Add ADIN1110 support 2022-09-20 15:00:30 +02:00
korina.c net: drop the weight argument from netif_napi_add 2022-09-28 18:57:14 -07:00
lantiq_etop.c net: lantiq_etop: don't free skb when returning NETDEV_TX_BUSY 2022-10-24 13:02:18 +01:00
lantiq_xrx200.c net: drop the weight argument from netif_napi_add 2022-09-28 18:57:14 -07:00
Makefile net: ethernet: adi: Add ADIN1110 support 2022-09-20 15:00:30 +02:00