Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp3601079pxb; Mon, 24 Jan 2022 13:14:37 -0800 (PST) X-Google-Smtp-Source: ABdhPJwFs9cXwjkYYOWhc2o2XZsFxb4fXxChwTYDMPTMyf0l1TzpqE4nFQWk1yaQfRnH/D9sotzZ X-Received: by 2002:a05:6a00:2404:b0:4c5:ee63:f326 with SMTP id z4-20020a056a00240400b004c5ee63f326mr15216023pfh.42.1643058876957; Mon, 24 Jan 2022 13:14:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643058876; cv=none; d=google.com; s=arc-20160816; b=uKMgRtitSsV+zyt8MSu8xvZb15ts0seI33YMsqpx58+UpEx3B/+GJ0KvIbvay9iU0r HmXYTrsCZLB2OiI8Wa0wXDwJ8dvXytvx2ZqNUGOBx2w2QIGUMvVfLGl7ZSxvh/TqajPm ReGvXYpmo5OGLrSXwFk8WSksDTS7Xs1HoLzxuzUi8Byo7Uj9lVcLvPl//E+aCluxB6sG TR7kAA/VQbDIFUDllsWrQOlhR71ISEj5t6/5xDWtFIc3OCVaOP89Zb07ATkR3wx2+HbN 72aBT+fHODte4n4rSL2TQ/9dienOroYhcfVPNQlmQ5nH+xHKrYyV+XFwYacssPHNromz tiEg== 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=RTU9Wz6C3RCxZ30A7g4SRJIAWUf5xZeBNCxgS9TxlW8=; b=FIp2ljlHg+DrZhznvdz3N+VHQe9F9zr40yToqeXjNFKdb1mXi+w+J58LNbK0LhbyVi KtIzdY1BVwyFDHLH4S/xm9Lglv/HDLFuB4FUYClkHkqOhikfc3rZ+uUNvSlHZYLFRdc4 9VFQcW0IumnprRhpbMCYchExVC69egqT2Ax6VlfCE6VwLSPfouVkXfjRmp2yzTvpqWXO isOwAziXhQdflp+lJ8gS/KcwDmWidvgLonY3kPUrQdoUzrOgbB7IQNwlGvYkfm3ttVDv RK7nXcO8zsqiQV2dptpnVxP+E8ReuBaKguB/D6Xgy4ziN/9pqQxQ/LFb2DaTkQnEl+A5 xGSQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=VtEk6vC0; 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 bb4si12524858plb.228.2022.01.24.13.14.22; Mon, 24 Jan 2022 13:14:36 -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=VtEk6vC0; 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 S1389983AbiAXUon (ORCPT + 99 others); Mon, 24 Jan 2022 15:44:43 -0500 Received: from dfw.source.kernel.org ([139.178.84.217]:51508 "EHLO dfw.source.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1382495AbiAXUZt (ORCPT ); Mon, 24 Jan 2022 15:25:49 -0500 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 D928A61382; Mon, 24 Jan 2022 20:25:48 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B210AC340E5; Mon, 24 Jan 2022 20:25:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1643055948; bh=7DICeP7dnUYHT+NLnmghG3OMqLh6wkc1OgzolyJEbeE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=VtEk6vC0nHnHTLs4S2Dgr230I0XnI6M1DdV9LoCJT+V33mY4T0S9+hfoRXE5hrhKq 9hV5QtczVxXcqgcNanL5qWdMMdyGLZ2Q18GKn3zuSESM5K33sRaAT4nTPS+U9hiyyl IciIX0hiMocl7mJYaj9JF/miJGf2MZL2LVv2VlKI= 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.15 292/846] software node: fix wrong node passed to find nargs_prop Date: Mon, 24 Jan 2022 19:36:49 +0100 Message-Id: <20220124184111.003587646@linuxfoundation.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220124184100.867127425@linuxfoundation.org> References: <20220124184100.867127425@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 c46f6a8e14d23..3ba1232ce8451 100644 --- a/drivers/base/swnode.c +++ b/drivers/base/swnode.c @@ -535,7 +535,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