Re: [PATCH 1/2] regulator: core: Only delay if we successfully setthe voltage

From: Mark Brown
Date: Tue Jun 26 2012 - 06:40:25 EST


On Tue, Jun 26, 2012 at 06:30:16PM +0800, Axel Lin wrote:

> >        /* Call set_voltage_time_sel if successfully obtained old_selector */
> > -       if (_regulator_is_enabled(rdev) && ret == 0 && old_selector >= 0 &&
> ^^^^^^^^
> We
> already check ret ==0 here.

Your mailer is seriously messing up your formatting - the indentation is
nothing to do with what you're trying to point at...

The checks do need to be reordered here, though - we should check the
return value first.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/