Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

phy: lynx-28g: avoid memsetting lane already allocated with kzalloc()

"priv" is allocated by lynx_28g_probe() using devm_kzalloc(), and the
lane is memory inside that structure (&priv->lane[id]). We don't have to
zero-initialize it, it is already filled with zeroes.

Suggested-by: Vinod Koul <vkoul@kernel.org>
Link: https://lore.kernel.org/linux-phy/aRYMM3ZuyBYH8zEC@vaman/
Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Link: https://patch.msgid.link/20251125114847.804961-5-vladimir.oltean@nxp.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>

authored by

Vladimir Oltean and committed by
Vinod Koul
2da0b221 7df7d58a

-2
-2
drivers/phy/freescale/phy-fsl-lynx-28g.c
··· 592 592 struct lynx_28g_lane *lane = &priv->lane[id]; 593 593 struct phy *phy; 594 594 595 - memset(lane, 0, sizeof(*lane)); 596 - 597 595 phy = devm_phy_create(priv->dev, dn, &lynx_28g_ops); 598 596 if (IS_ERR(phy)) 599 597 return PTR_ERR(phy);