Re: [PATCH] regulator: Set delay to 0 if set_voltage_time_selcallback returns error

From: Mark Brown
Date: Fri Feb 24 2012 - 09:51:41 EST


On Fri, Feb 24, 2012 at 03:17:46PM +0800, Axel Lin wrote:

> delay = rdev->desc->ops->set_voltage_time_sel(rdev,
> old_selector, selector);
> + if (delay < 0)
> + delay = 0;

We should complain if we get an error rather than silently ignore it,
possibly we'll end up returning prior to the ramp finishing which may
break things.

Attachment: signature.asc
Description: Digital signature