[RFC] regulator: anatop-regulator: Remove unneeded memset()

From: Fabio Estevam
Date: Mon Jan 06 2014 - 07:29:31 EST


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@xxxxxxxxxxxxx>
---
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@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/