]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
net: phy: dp83822: Improve readability in dp8382x_probe
authorStefan Wahren <wahrenst@gmx.net>
Thu, 28 May 2026 18:46:41 +0000 (20:46 +0200)
committerJakub Kicinski <kuba@kernel.org>
Tue, 2 Jun 2026 18:38:00 +0000 (11:38 -0700)
Introduce a local pointer for device so devm_kzalloc() fit into
a single line. Also this makes following changes easier to read.

Signed-off-by: Stefan Wahren <wahrenst@gmx.net>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Link: https://patch.msgid.link/20260528184642.33424-2-wahrenst@gmx.net
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/phy/dp83822.c

index c012dfab3171b96e90a33754e7aa25163d3949d6..d8c5b5cd1bc0ebfddcf50942f294610a659b7b2f 100644 (file)
@@ -984,10 +984,10 @@ static int dp83822_attach_mdi_port(struct phy_device *phydev,
 
 static int dp8382x_probe(struct phy_device *phydev)
 {
+       struct device *dev = &phydev->mdio.dev;
        struct dp83822_private *dp83822;
 
-       dp83822 = devm_kzalloc(&phydev->mdio.dev, sizeof(*dp83822),
-                              GFP_KERNEL);
+       dp83822 = devm_kzalloc(dev, sizeof(*dp83822), GFP_KERNEL);
        if (!dp83822)
                return -ENOMEM;