From aa7a74040a989eeb7a9265550a2538863e842a93 Mon Sep 17 00:00:00 2001 From: Axel Lin Date: Fri, 5 Nov 2010 15:25:12 +0800 Subject: [PATCH] regulator: Remove a redundant device_remove_file call in create_regulator We already have device_remove_file() in error path, no need to call it before goto link_name_err. Signed-off-by: Axel Lin Acked-by: Mark Brown Signed-off-by: Liam Girdwood --- drivers/regulator/core.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c index c625633..c3f93b4 100644 --- a/drivers/regulator/core.c +++ b/drivers/regulator/core.c @@ -1052,7 +1052,6 @@ static struct regulator *create_regulator(struct regulator_dev *rdev, printk(KERN_WARNING "%s: could not add device link %s err %d\n", __func__, dev->kobj.name, err); - device_remove_file(dev, ®ulator->dev_attr); goto link_name_err; } } -- 2.7.4