提交 aa7a7404 编写于 作者: A Axel Lin 提交者: Liam Girdwood

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: NAxel Lin <axel.lin@gmail.com>
Acked-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: NLiam Girdwood <lrg@slimlogic.co.uk>
上级 59c700cf
......@@ -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;
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册