lkml.org 
[lkml]   [2015]   [Sep]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] reset: Fix of_reset_control_get() for consistent return values
From
Date
Hi Alban,

Am Dienstag, den 01.09.2015, 17:28 +0200 schrieb Alban Bedel:
> When of_reset_control_get() is called without connection ID it returns
> -ENOENT when the 'resets' property doesn't exists or is an empty entry.
> However when a connection ID is given it returns -EINVAL when the 'resets'
> property doesn't exists or the requested name can't be found. This is
> because the error code returned by of_property_match_string() is just
> passed down as an index to of_parse_phandle_with_args(), which then
> returns -EINVAL.

Is that true? As far as I can see, since commit bd69f73f2c81
("of: Create function for counting number of phandles in a property")
it returns the (positive) number of entries if index is negative and the
'resets' property exists and parses correctly (before it would return
-ENOENT). If there are parsing errors, it can also return -EINVAL.

regards
Philipp



\
 
 \ /
  Last update: 2015-09-02 17:21    [W:0.037 / U:0.676 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site