From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 14ECAC433EF for ; Fri, 27 May 2022 09:07:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344429AbiE0JHV (ORCPT ); Fri, 27 May 2022 05:07:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49712 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1351055AbiE0JFr (ORCPT ); Fri, 27 May 2022 05:05:47 -0400 Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C60AD939E4 for ; Fri, 27 May 2022 02:02:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1653642143; x=1685178143; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=eYsKa4e6mwgarVAZTBWD6inWdHMk22CA5K+u/TXbC2U=; b=HowRhLrPKmGp7z0kyvV26JpkYRTpRE8V3gf0ISAc0hvCx9fy+gznlGxk /GM2LK9CZ0JHi1YmZ4led/UxLBIN0mmsquxfOIhpSTkyDLX+exYHYUhVq G2yV6LVgq6/Jsl6WUqsjMWdevUJ2fViFICGzMxUEW0sGx5xg9wE5awzpR yjfa1SoxNdj6Sq7KkawHTLWn2XbSBeWIiRzDFr/y4+FaMNUr1SxWSaKuN 6NDm3n7mVyiXT6bkVsMW/TAzonvPX6tFYER4zqOVxHOYS1dZ35LirWhBk ktB8osbrCDDB+Iw5srr0SuuUjg7YthsKAbLnIPLtlvjGU2mSVXsjkbf3C g==; X-IronPort-AV: E=McAfee;i="6400,9594,10359"; a="273239453" X-IronPort-AV: E=Sophos;i="5.91,255,1647327600"; d="scan'208";a="273239453" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 May 2022 02:02:09 -0700 X-IronPort-AV: E=Sophos;i="5.91,255,1647327600"; d="scan'208";a="718800217" Received: from punajuuri.fi.intel.com (HELO paasikivi.fi.intel.com) ([10.237.72.43]) by fmsmga001-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 May 2022 02:02:08 -0700 Received: from paasikivi.fi.intel.com (localhost [127.0.0.1]) by paasikivi.fi.intel.com (Postfix) with SMTP id ADB88201A7; Fri, 27 May 2022 12:02:06 +0300 (EEST) Date: Fri, 27 May 2022 12:02:06 +0300 From: Sakari Ailus To: "Rafael J. Wysocki" Cc: ACPI Devel Maling List , "Shevchenko, Andriy" Subject: Re: [PATCH v3 2/8] ACPI: property: Tie data nodes to acpi handles Message-ID: References: <20220525130123.767410-1-sakari.ailus@linux.intel.com> <20220525130123.767410-3-sakari.ailus@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org Hi Rafael, On Thu, May 26, 2022 at 09:19:17PM +0200, Rafael J. Wysocki wrote: > > +static int acpi_tie_nondev_subnodes(struct acpi_device_data *data) > > +{ > > + struct acpi_data_node *dn; > > + > > + list_for_each_entry(dn, &data->subnodes, sibling) { > > + acpi_status status; > > + int ret; > > + > > + status = acpi_attach_data(dn->handle, acpi_nondev_subnode_tag, dn); > > + if (ACPI_FAILURE(status)) { > > + acpi_handle_err(dn->handle, "Can't tag data node\n"); > > + return 0; > > + } > > + > > + ret = acpi_tie_nondev_subnodes(&dn->data); > > + if (ret) > > + return ret; > > Is it actually possible that this returns anything different from 0? acpi_attach_data() involves allocating memory and resolving a reference. Both can fail. -- Regards, Sakari Ailus