Re: [PATCH v5 5/5] regulator: of: Add support for parsing initial and suspend modes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On Fri, Nov 07, 2014 at 02:00:05PM +0100, Javier Martinez Canillas wrote:

> +	if (!of_property_read_u32(np, "regulator-initial-mode", &pval)) {
> +		if (desc && desc->map_modes)
> +			constraints->initial_mode = desc->map_modes(pval);
> +		else
> +			pr_warn("%s: failed to parse regulator-initial-mode\n",
> +				np->name);
> +	}

This is ignoring any error return from map_modes(), it's possible the DT
might have an invalid value.  The error message could also use some
improvement, it's more that the kernel doesn't understand how to parse
it even if it is valid.

Attachment: signature.asc
Description: Digital signature


[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]
  Powered by Linux