lkml.org 
[lkml]   [2022]   [Apr]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v5 1/4] device property: Allow error pointer to be passed to fwnode APIs
> @@ -480,15 +485,19 @@ int fwnode_property_get_reference_args(const
> struct fwnode_handle *fwnode,
> {
> int ret;
>
> + if (IS_ERR_OR_NULL(fwnode))
> + return -ENOENT;
> +
> ret = fwnode_call_int_op(fwnode, get_reference_args, prop,
> nargs_prop,
> nargs, index, args);
> + if (ret == 0)
> + return ret;
>
> - if (ret < 0 && !IS_ERR_OR_NULL(fwnode) &&
> - !IS_ERR_OR_NULL(fwnode->secondary))
> - ret = fwnode_call_int_op(fwnode->secondary, get_reference_args,
> - prop, nargs_prop, nargs, index, args);
> + if (IS_ERR_OR_NULL(fwnode->secondary))
> + return -ENOENT;

Doesn't this mean you overwrite any return code != 0 with -ENOENT?
Is this intended?

In any case:
Tested-by: Michael Walle <michael@walle.cc>

-michael

\
 
 \ /
  Last update: 2022-04-07 17:28    [W:0.103 / U:0.040 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site