18 Feb
2014
18 Feb
'14
2:27 a.m.
On Mon, Feb 17, 2014 at 11:04:18AM +0100, Markus Pargmann wrote:
- if (IS_ERR(aic32x4->supply_iov)) {
dev_err(dev, "Missing supply 'iov'\n");
ret = -EINVAL;
- }
This won't work with deferred probe and is ignoring the error value reported by the regualtor API. It should pass back what it was given and still needs to handle deferred probe even if it's happy for a regulator not to be there.
- if (!IS_ERR(aic32x4->supply_iov)) {
ret = regulator_enable(aic32x4->supply_iov);
if (ret) {
printk("Failed to enable regulator iov\n");
return ret;
}
- }
dev_err(). It would probably be easier to put one of the child regulators you did get into supply_iov instead so that outside of the probe you don't need to worry about which is actually there.
I'm also not seeing any disables prior to remove.