[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <df3a78036864716fbeecf3cd94dbcbbe@walle.cc>
Date: Wed, 06 Apr 2022 20:05:23 +0200
From: Michael Walle <michael@...le.cc>
To: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
Cc: linux-acpi@...r.kernel.org, linux-kernel@...r.kernel.org,
Daniel Scally <djrscally@...il.com>,
Heikki Krogerus <heikki.krogerus@...ux.intel.com>,
Sakari Ailus <sakari.ailus@...ux.intel.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
"Rafael J. Wysocki" <rafael@...nel.org>,
Len Brown <lenb@...nel.org>,
Nuno Sá <nuno.sa@...log.com>
Subject: Re: [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@...le.cc>
-michael
Powered by blists - more mailing lists