Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp3608432pxb; Mon, 24 Jan 2022 13:25:28 -0800 (PST) X-Google-Smtp-Source: ABdhPJw0PK2k66OU4VMeR8NzP5lwJj0Y5426NffH4k5+eSPIlVqwQ5I6Na5fgEFJkvpWRLvMuqRS X-Received: by 2002:a17:902:b206:b0:149:3b5d:2b8b with SMTP id t6-20020a170902b20600b001493b5d2b8bmr15540170plr.162.1643059528397; Mon, 24 Jan 2022 13:25:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643059528; cv=none; d=google.com; s=arc-20160816; b=PsELMoskWyMW/OwP3nSV8pX2qvq3cNtqhEsTrnDXWUuZEbVeJPc9Wb53WpHzRZ/VHw 7I7PD17C15metkIYWiFQXLzoGRnUZBoCKcfIIBOLZMk9X5VslbBPL7VRXnklT2HbD8tH rFB1ivW4VF1M9QI34mR9rLTBJsaTe92beeaNXWNJmuyPzatvDCfT1ny7nExpTckIa9v/ OVDwK6sKh5pq70r+EhtFhQRE41Ngj3R/5pK7zrHpq6o571glMAAxMa7kVm2DyfsXZQRz bWC/3v0V70OrAe84hf57amuv9iqCr8NwgfGtA7fBYtkq93uv3kDBFEQu3oPxJyzSjuJh U/cA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=z5oikcu9RV/MkBnenhh988/07FvTQExlJdfXFe+3XcA=; b=bdru2hjyJr3LOe+52hXiysgSb9K18KmOC4KOj+8PQnHoBb95Igg05GJPG6IZPVQzAM SCwmwDN1GXiDP0hNbnMI7oRwMJPaCQIRNrD/47msM5EEF7uBk7Svo/N6L36iK9z7bR2X y+4VIqtypFzrERzFhJUdVX23IO5dI9MtS2YdcjA6vGi3UU6z2HZfyvLJOdcLa6YBJ9CC EtwfDfA7MiOAZTmZaEVB/6/iFpAnR9S67OHeMemMnY6gmLL5P3lJaN4lFXOkmhpBoTMw vkJCahziF83AuU8f8NoRG7T6emcR1Q6FXKXg7vRByA8Haefutsim6ccsLLwdcaE5zLUO V7Kw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=YeZhf17q; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l62si6878516pgd.329.2022.01.24.13.25.12; Mon, 24 Jan 2022 13:25:28 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=YeZhf17q; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1444754AbiAXVBZ (ORCPT + 99 others); Mon, 24 Jan 2022 16:01:25 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40330 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1387634AbiAXUhA (ORCPT ); Mon, 24 Jan 2022 15:37:00 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BAD25C02B8D2; Mon, 24 Jan 2022 11:50:45 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 9DB1660B11; Mon, 24 Jan 2022 19:50:45 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7A73CC340E5; Mon, 24 Jan 2022 19:50:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1643053845; bh=OJih1Jcf4b2viqGvfEjCDpa3eJtwp2vKJgAcrR28yf0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=YeZhf17qQ2NNAD+2ULRHdKpp+3CBJMtxI5jUwiukYDt0MqU+KAnOmtq1xf7WArn0I YzVVtkngUHZnYQF/L/6iVF30tCW7T9iv+R4yfI61LJR3aT9t0HtUIFEEA6i8SkC6lo KEWG1KRqAPl37xyyZxDbtP27hjI2e89PiS+Ih6rQ= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, =?UTF-8?q?Cl=C3=A9ment=20L=C3=A9ger?= , Sakari Ailus , Daniel Scally , Heikki Krogerus , "Rafael J. Wysocki" , Sasha Levin Subject: [PATCH 5.10 195/563] software node: fix wrong node passed to find nargs_prop Date: Mon, 24 Jan 2022 19:39:20 +0100 Message-Id: <20220124184031.178454245@linuxfoundation.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220124184024.407936072@linuxfoundation.org> References: <20220124184024.407936072@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Clément Léger [ Upstream commit c5fc5ba8b6b7bebc05e45036a33405b4c5036c2f ] nargs_prop refers to a property located in the reference that is found within the nargs property. Use the correct reference node in call to property_entry_read_int_array() to retrieve the correct nargs value. Fixes: b06184acf751 ("software node: Add software_node_get_reference_args()") Signed-off-by: Clément Léger Reviewed-by: Sakari Ailus Reviewed-by: Daniel Scally Acked-by: Heikki Krogerus Signed-off-by: Rafael J. Wysocki Signed-off-by: Sasha Levin --- drivers/base/swnode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/base/swnode.c b/drivers/base/swnode.c index 206bd4d7d7e23..d2fb3eb5816c3 100644 --- a/drivers/base/swnode.c +++ b/drivers/base/swnode.c @@ -519,7 +519,7 @@ software_node_get_reference_args(const struct fwnode_handle *fwnode, return -ENOENT; if (nargs_prop) { - error = property_entry_read_int_array(swnode->node->properties, + error = property_entry_read_int_array(ref->node->properties, nargs_prop, sizeof(u32), &nargs_prop_val, 1); if (error) -- 2.34.1