netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next 0/3] net: Fix return value check for get_phy_device()
@ 2023-08-17  7:39 Ruan Jinjie
  2023-08-17  7:39 ` [PATCH net-next 1/3] net: mdio: " Ruan Jinjie
                   ` (3 more replies)
  0 siblings, 4 replies; 10+ messages in thread
From: Ruan Jinjie @ 2023-08-17  7:39 UTC (permalink / raw)
  To: Shyam-sundar.S-k, davem, edumazet, kuba, pabeni, yisen.zhuang,
	salil.mehta, iyappan, keyur, quan, andrew, hkallweit1, linux,
	yankejian, netdev
  Cc: ruanjinjie

The get_phy_device() function returns error pointers and never
returns NULL. Update the checks accordingly.

And get_phy_device() returns -EIO on bus access error and -ENOMEM
on kzalloc failure in addition to -ENODEV, return PTR_ERR is more
sensible.

Ruan Jinjie (3):
  net: mdio: Fix return value check for get_phy_device()
  amd-xgbe: Return proper error code for get_phy_device()
  net: hisilicon: hns: Fix return value check for get_phy_device()

 drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c       | 2 +-
 drivers/net/ethernet/hisilicon/hns/hns_dsaf_mac.c | 4 ++--
 drivers/net/mdio/mdio-xgene.c                     | 2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)

-- 
2.34.1


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2023-08-17 12:54 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-17  7:39 [PATCH net-next 0/3] net: Fix return value check for get_phy_device() Ruan Jinjie
2023-08-17  7:39 ` [PATCH net-next 1/3] net: mdio: " Ruan Jinjie
2023-08-17 12:25   ` Andrew Lunn
2023-08-17  7:39 ` [PATCH net-next 2/3] amd-xgbe: Return proper error code " Ruan Jinjie
2023-08-17  8:09   ` Shyam Sundar S K
2023-08-17 12:28   ` Andrew Lunn
2023-08-17 12:54     ` Ruan Jinjie
2023-08-17  7:40 ` [PATCH net-next 3/3] net: hisilicon: hns: Fix return value check " Ruan Jinjie
2023-08-17 12:29   ` Andrew Lunn
2023-08-17  8:04 ` [PATCH net-next 0/3] net: " Leon Romanovsky

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).