[PATCH v3 2/2] regulator: anatop-regulator: Remove unneeded variable

From: Fabio Estevam
Date: Mon Dec 23 2013 - 09:45:06 EST


From: Fabio Estevam <fabio.estevam@xxxxxxxxxxxxx>

There is no need to create a local variable for accessing sreg->name.

Access it directly instead.

Signed-off-by: Fabio Estevam <fabio.estevam@xxxxxxxxxxxxx>
---
Changes since v2:
- None

drivers/regulator/anatop-regulator.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/regulator/anatop-regulator.c b/drivers/regulator/anatop-regulator.c
index 88d95cd..cc545a0 100644
--- a/drivers/regulator/anatop-regulator.c
+++ b/drivers/regulator/anatop-regulator.c
@@ -226,9 +226,8 @@ static int anatop_regulator_remove(struct platform_device *pdev)
{
struct regulator_dev *rdev = platform_get_drvdata(pdev);
struct anatop_regulator *sreg = rdev_get_drvdata(rdev);
- const char *name = sreg->name;

- kfree(name);
+ kfree(sreg->name);

return 0;
}
--
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/