sreg is allocated via devm_kzalloc(), so there is no need to explicitly zero out
rdesc via memset().
Signed-off-by: Fabio Estevam <[email protected]>
---
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
On Mon, Jan 06, 2014 at 10:29:08AM -0200, Fabio Estevam wrote:
> sreg is allocated via devm_kzalloc(), so there is no need to explicitly zero out
> rdesc via memset().
Applied, thanks.