Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp9102075pxu; Mon, 28 Dec 2020 06:41:23 -0800 (PST) X-Google-Smtp-Source: ABdhPJxtMM6M8wXvlpPLKMkGZlw++Q+mOdnNWVuzmKRNSfw/wvDrJAVD/8yp6DiUulbOWDk4ALrD X-Received: by 2002:aa7:db56:: with SMTP id n22mr43152735edt.4.1609166482997; Mon, 28 Dec 2020 06:41:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609166482; cv=none; d=google.com; s=arc-20160816; b=xpY0HZWqCgBM7eRyEIiHZqphp5vZCq0GIUc4CpkPTAV4a3+/TAAdLGLuSEC47Wstis zeczQ/8ubAHoDa1xx32wGptC9+1aM79vpsLEl9lL0BZdveRTgk1a9aPEGjvI0WDo6Rsi NxD+m6l6ZKz1iee5SdR0kDDf38QqTX3O3fD52STtL1fNxJbyI02gdV2YI75nPu/1DFbz PKyJI2Q6wFtl1RYRJyAv8UbpchqsZV5fvN5Yoppk0wVcTAJtrD4trFfTKqhgvclJVsPC /xJ1GRxvXWXHF1yXTwZnmnHPHslZRwzfd7Tp7oRVZwyRuHfHHTtwFmlBJDhfeGcP7RBR xEnQ== 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=Dxlv+AJ2Meb7sF+5XIOACB+sq6jOURvLq6qiWZ79X+s=; b=Mpa50ThKjpjYSxQnoBERpASIaTDgqBkKKibhQOrBgsOJCI39F4CZ6Lx+TM+nxNI4C0 r9vRBU7og8aQI90mXfuB9McVnmeKIj7K2Iqfb7OxYyZqrxHMXe8Pn/1RPh1Lo/rtq6dm lZNxW7lNvf4+yBw2olHQHWxgCK0x1ETuz0YQ4yC4NXLScxXaf+PxdbZNBiow6iM0sF68 Vcd0HhK0tp4za97tC6feuAG9g6wuu2vJPjS3na5WPuH7SvPV6ZmMg0emhJuUTEYuUxFD StfUnpfwtkro7/yyEMYLrfxORgP9K7WmuAQUMoeZcEWwKY+A68X8Av44sO2sVx5zDhSt OPpA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=XDgEpY5m; 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 o12si18283773ejg.407.2020.12.28.06.40.59; Mon, 28 Dec 2020 06:41:22 -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=XDgEpY5m; 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 S2392243AbgL1OhV (ORCPT + 99 others); Mon, 28 Dec 2020 09:37:21 -0500 Received: from mail.kernel.org ([198.145.29.99]:40690 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2504774AbgL1Ocm (ORCPT ); Mon, 28 Dec 2020 09:32:42 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 8355220739; Mon, 28 Dec 2020 14:32:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1609165922; bh=Z8Kcy0ZJWO6UT2FhKqTFgdUpl7TCqwLddwe/UT+spO0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=XDgEpY5m6f0pruJY+mHTnNma+2sxdmFTi9RRYvtKw4YYM3dCNUam++bDegVe6iQRV XK5EIDw/TIxaoUkipqEFFpFQYaEj87lXpnUmUONyedKcvj2Bn5QXgyWl32SJAklcMd rEXPLQk/+jgsjJMhKItVgLSKVN3ksqjqpDpOfxvY= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Pavel Machek , Lad Prabhakar , Sergei Shtylyov , Geert Uytterhoeven , Krzysztof Kozlowski Subject: [PATCH 5.10 702/717] memory: renesas-rpc-if: Fix a node reference leak in rpcif_probe() Date: Mon, 28 Dec 2020 13:51:40 +0100 Message-Id: <20201228125054.616851738@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201228125020.963311703@linuxfoundation.org> References: <20201228125020.963311703@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: Lad Prabhakar commit 4e6b86b409f9fc63fedb39d6e3a0202c4b0244ce upstream. Release the node reference by calling of_node_put(flash) in the probe. Fixes: ca7d8b980b67f ("memory: add Renesas RPC-IF driver") Reported-by: Pavel Machek Signed-off-by: Lad Prabhakar Reviewed-by: Sergei Shtylyov Reviewed-by: Geert Uytterhoeven Reviewed-by: Pavel Machek (CIP) Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20201126191146.8753-4-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Krzysztof Kozlowski Signed-off-by: Greg Kroah-Hartman --- drivers/memory/renesas-rpc-if.c | 2 ++ 1 file changed, 2 insertions(+) --- a/drivers/memory/renesas-rpc-if.c +++ b/drivers/memory/renesas-rpc-if.c @@ -560,9 +560,11 @@ static int rpcif_probe(struct platform_d } else if (of_device_is_compatible(flash, "cfi-flash")) { name = "rpc-if-hyperflash"; } else { + of_node_put(flash); dev_warn(&pdev->dev, "unknown flash type\n"); return -ENODEV; } + of_node_put(flash); vdev = platform_device_alloc(name, pdev->id); if (!vdev)