From 06e57b6c1e6cfabdaf6fb95207dcefe03c20b06d Mon Sep 17 00:00:00 2001 From: Fabio Estevam Date: Mon, 6 Jan 2014 10:29:08 -0200 Subject: [PATCH] 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 Signed-off-by: Mark Brown --- 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 3d4997aede1d..862e63e451d0 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; -- 2.20.1