]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
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 c62563322969732d5ccba7fa457ac11718c1dd27..c3f93b401e905d4ade335cd96dbe028ff25a29a7 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;
                }
        }