Received: by 2002:a05:6a10:83d0:0:0:0:0 with SMTP id o16csp27751pxh; Thu, 7 Apr 2022 12:59:12 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwUj+SEZThDSLudmtj/UkijldSmFG8lZ+Gbo3fZLtJgVNBccmvM2UE8U4uc3PTNbj/xz+1P X-Received: by 2002:a17:90a:d584:b0:1bc:e520:91f2 with SMTP id v4-20020a17090ad58400b001bce52091f2mr18041785pju.192.1649361552740; Thu, 07 Apr 2022 12:59:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649361552; cv=none; d=google.com; s=arc-20160816; b=cxMlVlBqNkGbFFMQVrlJp1lTJqiLcxlq1YsYuMcvjU1eIwKNJo7kSyVS4ANBX/Odde WlfGq9Rcqg713sl8LFJ6gyNU6C1li75jvtZ5gLoBWPY4qWq6vkfpSsL5MUUpWCpvdLPE HQd3GC4lbB2Awn41te6gYtPrGdou5CDlfHWOSWcxJk1E9zKdYV20TSiKovCj2nXuj2pu 7jLEXDh9sbvbfh+Fihy4EvVeJkUBxux/hGzHdmfYjkZYZxfX0vSiiywVCS+Uimvb7DqX jSjHmFmVBmLGjeFX0fhHrROsPZtxw8D5X/TDL956Et2UHza9bY9zu2pr0dFZR2T9klh1 wiWw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:organization:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=+pP76yNV9SkuFZLoyffTifCVhptOkzjrxQyBHHwC8z8=; b=veKG7aEtYnQH49lYnZr7xrBzRohpF8QL2Gvv3dRVnITCjdUj31bPO0GVreOBnruKEg Tl9RK6KkddJhbkbE+KGBz1kvnHjWVgrtvW2AUQ1g6eoc+E+EcCWj2evVggN55eKQw90L wX8svzgIRMM1XugepkBIbQ+t3TW8V7DZlrZWr6CV4WhYcNgidwOwebQ6jnJ7YISjAkn8 2Z8edYzWCOwL+5OetSk1vehHc8PKSXNOua+rab+NflISwFKzv2OlhSdfBOJgOrwxaM2e y3vP+DC+6aVJgOyyiBLWu8iJmxKmudg3FqTEQnAIIELgFfMpsyGW9+Ky4SBcX74OL0nS VMGw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=lSVOjOVS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id s9-20020a632149000000b00398d8a5f4d2si20027120pgm.618.2022.04.07.12.59.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Apr 2022 12:59:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=lSVOjOVS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id CAEFE27FC8E; Thu, 7 Apr 2022 12:25:25 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244187AbiDGKXs (ORCPT + 99 others); Thu, 7 Apr 2022 06:23:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43456 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244186AbiDGKXn (ORCPT ); Thu, 7 Apr 2022 06:23:43 -0400 Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 187941AB9FE; Thu, 7 Apr 2022 03:21:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1649326902; x=1680862902; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=14uR+X8D1hFafUVEmn6fSTwQ5pea2ecTUrj5n9ZrzLQ=; b=lSVOjOVSyIDMpxpVb+NikGKkdpG14vXVIfX4V47zzxc/kBUU5Wcdhclo HSkg8qNaoGvKy1L5rqgHhETS9JMPxyyTLIpkuIKuAYv0VeZJ7q4sBD57D CHsxB5odDR8Y1aD8mljOzV3UKT6FxoocWmnn26mWSclkbeUkTwlBEVDgm usqXlO90hwXJdlCXVZ9vxgO0kAyHGlOCVhbQNbbY6oFN09Z/lHghiPbtl t+MDrg2h2RYZZk4FQbilPmkv4QeYWt6mVVZ8+sgiNvulivCeed2YB0KIM qK1IMAkqOHbV4ct4LZSNwP1GOc77198KEVCBkhl8MqNC4xcKGqNA2NjGi A==; X-IronPort-AV: E=McAfee;i="6200,9189,10309"; a="248809078" X-IronPort-AV: E=Sophos;i="5.90,241,1643702400"; d="scan'208";a="248809078" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Apr 2022 03:21:18 -0700 X-IronPort-AV: E=Sophos;i="5.90,241,1643702400"; d="scan'208";a="722903528" Received: from smile.fi.intel.com ([10.237.72.54]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Apr 2022 03:21:15 -0700 Received: from andy by smile.fi.intel.com with local (Exim 4.95) (envelope-from ) id 1ncPEu-000KjM-I7; Thu, 07 Apr 2022 13:19:44 +0300 Date: Thu, 7 Apr 2022 13:19:44 +0300 From: Andy Shevchenko To: Michael Walle 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 , Nuno =?iso-8859-1?Q?S=E1?= Subject: Re: [PATCH v5 1/4] device property: Allow error pointer to be passed to fwnode APIs Message-ID: References: <20220406130552.30930-1-andriy.shevchenko@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED autolearn=no 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 On Wed, Apr 06, 2022 at 08:05:23PM +0200, Michael Walle wrote: ... > > + 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? Indeed, it would shadow the error code. So, it should go with if (IS_ERR_OR_NULL(fwnode->secondary)) return ret; then. > In any case: > Tested-by: Michael Walle Thanks! -- With Best Regards, Andy Shevchenko