regulator: Remove a redundant device_remove_file call in create_regulator
authorAxel Lin <axel.lin@gmail.com>
Fri, 5 Nov 2010 07:25:12 +0000 (15:25 +0800)
committerLiam Girdwood <lrg@slimlogic.co.uk>
Tue, 30 Nov 2010 15:13:25 +0000 (15:13 +0000)
We already have device_remove_file() in error path,
no need to call it before goto link_name_err.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
drivers/regulator/core.c

index c625633..c3f93b4 100644 (file)
@@ -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, &regulator->dev_attr);
                        goto link_name_err;
                }
        }