summaryrefslogtreecommitdiff
path: root/drivers/net/phy
diff options
context:
space:
mode:
authorJakub Kicinski <kuba@kernel.org>2022-01-06 01:36:10 +0300
committerJakub Kicinski <kuba@kernel.org>2022-01-06 01:36:10 +0300
commitb9adba350a841e8233d3e4d8d3c8dede3fc88c46 (patch)
tree2fbaa3fb25cf76d44a510e0c4f96c02622e268f9 /drivers/net/phy
parent4e4f325a0a55907b14f579e6b1a38c53755e3de2 (diff)
parent75acfdb6fd922598a408a0d864486aeb167c1a97 (diff)
downloadlinux-b9adba350a841e8233d3e4d8d3c8dede3fc88c46.tar.xz
Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
No conflicts. Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers/net/phy')
-rw-r--r--drivers/net/phy/fixed_phy.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/phy/fixed_phy.c b/drivers/net/phy/fixed_phy.c
index a0c256bd5441..c65fb5f5d2dc 100644
--- a/drivers/net/phy/fixed_phy.c
+++ b/drivers/net/phy/fixed_phy.c
@@ -239,8 +239,8 @@ static struct phy_device *__fixed_phy_register(unsigned int irq,
/* Check if we have a GPIO associated with this fixed phy */
if (!gpiod) {
gpiod = fixed_phy_get_gpiod(np);
- if (!gpiod)
- return ERR_PTR(-EINVAL);
+ if (IS_ERR(gpiod))
+ return ERR_CAST(gpiod);
}
/* Get the next available PHY address, up to PHY_MAX_ADDR */