lkml.org 
[lkml]   [2014]   [Nov]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v5 5/5] regulator: of: Add support for parsing initial and suspend modes
On 11/07/2014 04:47 PM, Mark Brown wrote:
> 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.
>

Right, as I mentioned to Krzysztof in a previous email, I'll remove the
warning message and add an error message instead if the map mode callback
function fails and also show the error code as you suggest.

Best regards,
Javier


\
 
 \ /
  Last update: 2014-11-07 17:41    [W:0.583 / U:0.108 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site