Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp1790308pxp; Mon, 7 Mar 2022 02:23:07 -0800 (PST) X-Google-Smtp-Source: ABdhPJyY3LIxVCyd3B5hehCrOEQo8fPTjaKfO2nv8av0/jAKB5Zq/NgHTHBvD01M1X1c6QmCwD74 X-Received: by 2002:a17:903:4a:b0:151:be09:3de9 with SMTP id l10-20020a170903004a00b00151be093de9mr11364132pla.138.1646648587705; Mon, 07 Mar 2022 02:23:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646648587; cv=none; d=google.com; s=arc-20160816; b=w73Y7uI4qyIlKM93ejVa0uAjp128Nz9fi7zxJfkFZSmHAGMYF6Ez08RJOaVrsjSKVP ToxofnSbJb7X5rnazgHYexfCbEvP6TOMRi38lSmN4SX9DpUGTYCjg5PZ7INk2dXmsVCX 1OwoeD9QpCpelUsGIEUsQHAwlnX0mGRhUI3y0b4clqKhSOPfIVBEM8qefpVFRv2VTbC6 QtIRB6S83iO5rda1MNrZY8jKoCMKeiwxJI2tV1OxORSPjo3wgVQ6V/FLPXZlyo1wyyIi lInlACK5SMhQz1kuLroEMdCll8sa4XCMVSiWQfoSopxHg66eVHSy9xQhUw9wasrF4Pyk hetw== 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=lK2Z3DWZE7AZEgREGINFUKYkQTu0s4NTdBl8Jmw1Qks=; b=ziQIcUdP3Fc+BDhCPByMj8I10T6jojLjfn27FT87kUxwie6xbqKmZOHZLzOFJtHI31 pHddPFtk+R1G6+h7YhEJLtLQRC0Yc7gUxhvzcXOrtbsnxs2qtGk7pAYBTzW3QLoRrMH+ 359ie39kShm5uzhFqSCexu5GVqnAYxfdJ46BAVi21z0aILWYWI7eaa2dttMntfQKC/og lANJ8Xx9iFuT2t8g7oRGpQA/uAfzaJpcnj5YDoLr3ePZbtqR1e3HOVIFL/7WBEYNtYRJ C0S+P+c9OqGWqA6LBT5a0OG+/8i6Xrlk9HtYI3W1tgFn38JYtpd+lDlSWCsnpDnUprli BGdw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=eZ+lZXhw; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id m8-20020a17090aab0800b001bf1a231c27si6696646pjq.129.2022.03.07.02.22.51; Mon, 07 Mar 2022 02:23:07 -0800 (PST) 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=@linuxfoundation.org header.s=korg header.b=eZ+lZXhw; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238750AbiCGJ4u (ORCPT + 99 others); Mon, 7 Mar 2022 04:56:50 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55702 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238826AbiCGJix (ORCPT ); Mon, 7 Mar 2022 04:38:53 -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 CCE586BDFD; Mon, 7 Mar 2022 01:33:32 -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 B5A2A6116E; Mon, 7 Mar 2022 09:33:23 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C2295C340F3; Mon, 7 Mar 2022 09:33:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1646645603; bh=oe7SPUu/FZii2D5OpDZKgwBQny+lXJx42fOx2VDyJj0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=eZ+lZXhwwy5dsMzeFCTfBCl9k+1eZYhnJqFSFSC3+cbbmyVkFX2GRVKNJCzujsyOj cCwNrf69xeQ7h96x4l3regTML1ilUqzxICSiXXkqV2YoDBygGRAo89DqIfi2TMh2q1 PiOkslrI99WLzwDmv7sjBoKmpAHGU+iN2NtAnGuY= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Tyrel Datwyler , Christophe JAILLET , Li Yang , Sasha Levin Subject: [PATCH 5.10 084/105] soc: fsl: guts: Revert commit 3c0d64e867ed Date: Mon, 7 Mar 2022 10:19:27 +0100 Message-Id: <20220307091646.542408900@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220307091644.179885033@linuxfoundation.org> References: <20220307091644.179885033@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, 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 From: Christophe JAILLET [ Upstream commit b113737cf12964a20cc3ba1ddabe6229099661c6 ] This reverts commit 3c0d64e867ed ("soc: fsl: guts: reuse machine name from device tree"). A following patch will fix the missing memory allocation failure check instead. Suggested-by: Tyrel Datwyler Signed-off-by: Christophe JAILLET Signed-off-by: Li Yang Signed-off-by: Sasha Levin --- drivers/soc/fsl/guts.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/soc/fsl/guts.c b/drivers/soc/fsl/guts.c index 34810f9bb2ee..6d7465afd6fd 100644 --- a/drivers/soc/fsl/guts.c +++ b/drivers/soc/fsl/guts.c @@ -28,7 +28,6 @@ struct fsl_soc_die_attr { static struct guts *guts; static struct soc_device_attribute soc_dev_attr; static struct soc_device *soc_dev; -static struct device_node *root; /* SoC die attribute definition for QorIQ platform */ @@ -138,7 +137,7 @@ static u32 fsl_guts_get_svr(void) static int fsl_guts_probe(struct platform_device *pdev) { - struct device_node *np = pdev->dev.of_node; + struct device_node *root, *np = pdev->dev.of_node; struct device *dev = &pdev->dev; struct resource *res; const struct fsl_soc_die_attr *soc_die; @@ -161,8 +160,9 @@ static int fsl_guts_probe(struct platform_device *pdev) root = of_find_node_by_path("/"); if (of_property_read_string(root, "model", &machine)) of_property_read_string_index(root, "compatible", 0, &machine); + of_node_put(root); if (machine) - soc_dev_attr.machine = machine; + soc_dev_attr.machine = devm_kstrdup(dev, machine, GFP_KERNEL); svr = fsl_guts_get_svr(); soc_die = fsl_soc_die_match(svr, fsl_soc_die); @@ -197,7 +197,6 @@ static int fsl_guts_probe(struct platform_device *pdev) static int fsl_guts_remove(struct platform_device *dev) { soc_device_unregister(soc_dev); - of_node_put(root); return 0; } -- 2.34.1