Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp1304074pxb; Wed, 6 Apr 2022 14:22:20 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzTSTHF1nIaoVQD1XCspVnxjrHEcILAxX9qgP/jU1ZxvOl+7RAJb4FV8CX35v9lhuPJc2kl X-Received: by 2002:aa7:9110:0:b0:4fa:e388:af57 with SMTP id 16-20020aa79110000000b004fae388af57mr10651164pfh.1.1649280139951; Wed, 06 Apr 2022 14:22:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649280139; cv=none; d=google.com; s=arc-20160816; b=OaJv7zxNOnRICudzfGbxs+v6c4e0eRUMLkr2bVgpLq2WoHqVzcZsLiVwVDF8dIRZgd AfOOHYAqsqLIuRI5A8cUaE+GfscXmQYKpJxjpzd5WzRdcq3/mZ8qpuniIHPUvT6S38N6 GNuMJsFvRsVX0rdHzW3JmDrAvGNCrog3yha1hGXZfXSjFXNnqirTT7bfOvpBnXWg7Zf3 VXcYXqPhd8LpLPSToId6L5RzEyoXLOV3u0jWtn1CwloBglNxyjVyuIh6nXSgEnJuwoV2 7QbRIlZKkxpwJq5XUfUrU/Gltrwao3X60h67uj3hY4Fs+7lkfmXNRLuhQJwdzpdFScEJ IxsQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:user-agent:references:in-reply-to :subject:cc:to:from:date:content-transfer-encoding:mime-version :dkim-signature; bh=WdgHMqtZeDUd5XPK4vCIN6iJKSacplbl+ZaR8H3HTk0=; b=hNY03joZNTdZusEtA3FyoYTofSYCZflIWjRS7tDBaOjerp4ZsQA2MAzGGrhsLpuQFu 8vciOvC5LVW+pqEU6k7jv1ePiFVB7MorLqOyJsuLDtW0xUZroZl2kFBA9tIiGcJmkjXD lOd4ZL9PvhAxcT2Qqd9jWvHgBOa3an+vZ2YSbPbKramx3elEOkgd0hsEwzxFELGPBtbH Yjrn7BwyPQwbBsob3MYiPdOvPcT9nUg4qRPLR3SF2n7gGHQ3TnOhJxlPAo7y1ouIzchM y1Euc2XyKgFxpNZxLu4i4jWtuLlW6SkRgIqom3xc/BO50h5vxVeiKluZ7gYR2e1Qhofh 7p8Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@walle.cc header.s=mail2016061301 header.b=rsYbwnuW; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 75-20020a63044e000000b003816043f006si16701906pge.507.2022.04.06.14.22.03; Wed, 06 Apr 2022 14:22:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@walle.cc header.s=mail2016061301 header.b=rsYbwnuW; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234687AbiDFUZg (ORCPT + 99 others); Wed, 6 Apr 2022 16:25:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35234 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234336AbiDFUWf (ORCPT ); Wed, 6 Apr 2022 16:22:35 -0400 Received: from ssl.serverraum.org (ssl.serverraum.org [IPv6:2a01:4f8:151:8464::1:2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2E479B6; Wed, 6 Apr 2022 11:05:27 -0700 (PDT) Received: from ssl.serverraum.org (web.serverraum.org [172.16.0.2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ssl.serverraum.org (Postfix) with ESMTPSA id 3AD0F22238; Wed, 6 Apr 2022 20:05:24 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=walle.cc; s=mail2016061301; t=1649268324; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=WdgHMqtZeDUd5XPK4vCIN6iJKSacplbl+ZaR8H3HTk0=; b=rsYbwnuW4AOU7D9+KaZMBH9acTHHKc0Om1r37bVxzrwHU/b4WROuV0asprVyHrhWd13H39 s/K2X0e9remuuDCeMCmjkGKTZhu8/0dBT/755enE087oRelQ4PGQvsoApkb1wenEFdWQLn 3RYthhiq0VmlxIaonky4wAfVHYkNjiE= MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Wed, 06 Apr 2022 20:05:23 +0200 From: Michael Walle To: Andy Shevchenko Cc: linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org, Daniel Scally , Heikki Krogerus , Sakari Ailus , Greg Kroah-Hartman , "Rafael J. Wysocki" , Len Brown , =?UTF-8?Q?Nuno_S=C3=A1?= Subject: Re: [PATCH v5 1/4] device property: Allow error pointer to be passed to fwnode APIs In-Reply-To: <20220406130552.30930-1-andriy.shevchenko@linux.intel.com> References: <20220406130552.30930-1-andriy.shevchenko@linux.intel.com> User-Agent: Roundcube Webmail/1.4.13 Message-ID: X-Sender: michael@walle.cc X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > @@ -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