lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20251125114847.804961-5-vladimir.oltean@nxp.com>
Date: Tue, 25 Nov 2025 13:48:36 +0200
From: Vladimir Oltean <vladimir.oltean@....com>
To: linux-phy@...ts.infradead.org
Cc: Ioana Ciornei <ioana.ciornei@....com>,
	Vinod Koul <vkoul@...nel.org>,
	Kishon Vijay Abraham I <kishon@...nel.org>,
	Neil Armstrong <neil.armstrong@...aro.org>,
	Josua Mayer <josua@...id-run.com>,
	linux-kernel@...r.kernel.org
Subject: [PATCH v5 phy 04/15] 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@...nel.org>
Link: https://lore.kernel.org/linux-phy/aRYMM3ZuyBYH8zEC@vaman/
Signed-off-by: Vladimir Oltean <vladimir.oltean@....com>
---
v4->v5: patch is new

 drivers/phy/freescale/phy-fsl-lynx-28g.c | 2 --
 1 file changed, 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);
-- 
2.34.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ