summaryrefslogtreecommitdiff
path: root/drivers/phy
diff options
context:
space:
mode:
authorVladimir Oltean <vladimir.oltean@nxp.com>2025-11-25 13:48:36 +0200
committerVinod Koul <vkoul@kernel.org>2025-12-23 23:11:06 +0530
commit2da0b2214f511744a967d370447bb9d511bf1348 (patch)
tree72cab1649cbbd3abab949b6837aa7c83596e3de9 /drivers/phy
parent7df7d58abbd60902751381dcd891a55c8228c523 (diff)
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>
Diffstat (limited to 'drivers/phy')
-rw-r--r--drivers/phy/freescale/phy-fsl-lynx-28g.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/drivers/phy/freescale/phy-fsl-lynx-28g.c b/drivers/phy/freescale/phy-fsl-lynx-28g.c
index 61a992ff274f..f6e6ea1262bc 100644
--- a/drivers/phy/freescale/phy-fsl-lynx-28g.c
+++ b/drivers/phy/freescale/phy-fsl-lynx-28g.c
@@ -592,8 +592,6 @@ static int lynx_28g_probe_lane(struct lynx_28g_priv *priv, int id,
struct lynx_28g_lane *lane = &priv->lane[id];
struct phy *phy;
- memset(lane, 0, sizeof(*lane));
-
phy = devm_phy_create(priv->dev, dn, &lynx_28g_ops);
if (IS_ERR(phy))
return PTR_ERR(phy);