[PATCH v2 1/2] mtd: maps: physmap: Add VPP regulator control

Mark Brown broonie at opensource.wolfsonmicro.com
Mon Jul 23 13:46:07 EDT 2012


On Wed, Jul 18, 2012 at 02:22:00PM +0100, Pawel Moll wrote:

> +	info->vpp_regulator = devm_regulator_get(&dev->dev, "vpp");
> +	if (IS_ERR(info->vpp_regulator))
> +		info->vpp_regulator = NULL;
> +

No, this is very bad karma.  You shouldn't just silently ignore the
error here, if we didn't get the supply it's probably important and
otherwise why bother checking the error at all?  Systems should use
a fixed voltage regulator to stub out the supply if there's not any
runtime contol.

At a bare minimum you should be passing back -EPROBE_DEFER if you get
that.



More information about the linux-mtd mailing list