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-next>] [day] [month] [year] [list]
Date:	Mon, 6 Jan 2014 10:29:08 -0200
From:	Fabio Estevam <fabio.estevam@...escale.com>
To:	<broonie@...nel.org>
CC:	<shawn.guo@...aro.org>, <anson.huang@...escale.com>,
	<linux-kernel@...r.kernel.org>, <festevam@...il.com>,
	Fabio Estevam <fabio.estevam@...escale.com>
Subject: [RFC] regulator: anatop-regulator: Remove unneeded memset()

sreg is allocated via devm_kzalloc(), so there is no need to explicitly zero out
rdesc via memset().

Signed-off-by: Fabio Estevam <fabio.estevam@...escale.com>
---
Tested on a mx6qsabresd and I don't see the need for the memset.

Does anyone have any objection?

Thanks

 drivers/regulator/anatop-regulator.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/regulator/anatop-regulator.c b/drivers/regulator/anatop-regulator.c
index 3d4997a..862e63e 100644
--- a/drivers/regulator/anatop-regulator.c
+++ b/drivers/regulator/anatop-regulator.c
@@ -124,7 +124,6 @@ static int anatop_regulator_probe(struct platform_device *pdev)
 	sreg->initdata = initdata;
 	sreg->name = of_get_property(np, "regulator-name", NULL);
 	rdesc = &sreg->rdesc;
-	memset(rdesc, 0, sizeof(*rdesc));
 	rdesc->name = sreg->name;
 	rdesc->ops = &anatop_rops;
 	rdesc->type = REGULATOR_VOLTAGE;
-- 
1.8.1.2


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ