[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230817121631.1878897-1-ruanjinjie@huawei.com>
Date: Thu, 17 Aug 2023 20:16:27 +0800
From: Ruan Jinjie <ruanjinjie@...wei.com>
To: <rafal@...ecki.pl>, <bcm-kernel-feedback-list@...adcom.com>,
<davem@...emloft.net>, <edumazet@...gle.com>, <kuba@...nel.org>,
<pabeni@...hat.com>, <opendmb@...il.com>, <florian.fainelli@...adcom.com>,
<bryan.whitehead@...rochip.com>, <andrew@...n.ch>, <hkallweit1@...il.com>,
<linux@...linux.org.uk>, <mdf@...nel.org>, <pgynther@...gle.com>,
<Pavithra.Sathyanarayanan@...rochip.com>, <netdev@...r.kernel.org>
CC: <ruanjinjie@...wei.com>
Subject: [PATCH net-next v2 0/4] net: Fix return value check for fixed_phy_register()
Since fixed_phy_get_gpiod() return NULL instead of
ERR_PTR(), the IS_ERR() check is not correct to return the err.
The fixed_phy_register() function returns error pointers and never
returns NULL.
And fixed_phy_register() function also returns -EPROBE_DEFER, -EINVAL and
-EBUSY, etc, in addition to -ENODEV or -EIO, Use PTR_ERR instead.
Changes in v2:
- Remove redundant NULL check.
- Fix the return value for fixed_phy_register().
- Fix the return value check for fixed_phy_get_gpiod().
- Fix the return value also for lan743x.
Ruan Jinjie (4):
net: phy: fixed_phy: Fix return value check for fixed_phy_get_gpiod
net: bgmac: Fix return value check for fixed_phy_register()
net: bcmgenet: Fix return value check for fixed_phy_register()
net: lan743x: Fix return value check for fixed_phy_register()
drivers/net/ethernet/broadcom/bgmac.c | 4 ++--
drivers/net/ethernet/broadcom/genet/bcmmii.c | 4 ++--
drivers/net/ethernet/microchip/lan743x_main.c | 2 +-
drivers/net/phy/fixed_phy.c | 4 ++--
4 files changed, 7 insertions(+), 7 deletions(-)
--
2.34.1
Powered by blists - more mailing lists