mirror of
https://github.com/torvalds/linux.git
synced 2026-07-27 17:47:41 +02:00
net: phy: dp83822: Improve readability in dp8382x_probe
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>
This commit is contained in:
parent
ceac8dbce6
commit
d790b70643
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user