Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp2226916imm; Mon, 28 May 2018 04:19:42 -0700 (PDT) X-Google-Smtp-Source: AB8JxZqVBpk2jL02UvxiTnkXbf5ZSwI/li8iw6u0T8t/DKyRQLOBuZp58gxgfzu1keWvKKVQ9VV0 X-Received: by 2002:a17:902:8308:: with SMTP id bd8-v6mr13296031plb.195.1527506382919; Mon, 28 May 2018 04:19:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527506382; cv=none; d=google.com; s=arc-20160816; b=T+Du97f9QIFimpO5Nr8UqvSLEZBcIj5S2PKPK/lnbuc/5dGwkRxP1qbr/hmWjUcDnx T06W8a53g1hP5PuF+gO7E44+ShTmDsV7uQtjsZVa2OKNSVtu9URGiURgZ9oYFOfqxu83 PPg0mcjpqdu3monWA4WvdpDLDWbQwplQP/5czNqkyB0emegCUuJWUwVsfxtPKLOYzw/d 33L2KfQbtmgbm0IQf4u2FutGNaUwMDsWTV53P2xUapyI8dOuPSLCZz4KHLi2pW1L/qtZ zho+h3NDo0BPAhTgiCSjO7DZS4nILHB3wrCqPv23va8G1+PG5OcPnfjHyrJ7JAT8/Jos j+Qw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=9Sg+YVfVqth2K4fJYUdbbQBn87ti3njUjQ471AN8WPc=; b=O7qNyXtJxD/ATujyKIpvTiC5k/adD4vGzuyshiVuefj5YvT3TrbIJOwQmIx/zbdeZS ym0EVr5jffkcMaecAHosZqU1COgS+mr0F60tIilKrhy4d5CINRmcKVoGP88EXnDkVy+N m0ouuQqdXtHMYGcb/hSYPL5+C16MPeSbxvZnIHsTVSUSI1ZeOVI7Zu5SsV9Mn6XribrE iiNhOx2eSkiw2RIsdsKyUkoofY6ZI4mQOeg4yI/NcW9asoYqzckB+cqb0vS25OOPAShz 4hmL770NXRo62FIH3Bvm8muJ+MtNQ2uzr8YcPVqp/paqg1F61mfHkOPm4ggxQ338vuT1 Ft7A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=X+EA38e/; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p73-v6si29783469pfk.275.2018.05.28.04.19.28; Mon, 28 May 2018 04:19:42 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=X+EA38e/; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1424768AbeE1LSg (ORCPT + 99 others); Mon, 28 May 2018 07:18:36 -0400 Received: from mail.kernel.org ([198.145.29.99]:35652 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1424670AbeE1LQn (ORCPT ); Mon, 28 May 2018 07:16:43 -0400 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id BAAEB206B7; Mon, 28 May 2018 11:16:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1527506203; bh=oezyFA2R0/DsWOhGwRWwbGEEiY+FrPQHLNIPtrqljVs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=X+EA38e/ZB1RQtpCyfD+ex1NOKT2xy0CFgiiMPRBgLlB3S/Escea8d0FuxEFc1Mcj gMhw0FOM1ST/YfYV68IMsYm/OLt5DNlX1wEB6c+JgbWIDFrs/00n3tHSomyWSzcmrA c+65CCtOlIytB7jgYaSwLpU65k/trGUADJpNxbkc= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Christophe JAILLET , Mark Brown , Sasha Levin Subject: [PATCH 4.16 268/272] regulator: of: Add a missing of_node_put() in an error handling path of of_regulator_match() Date: Mon, 28 May 2018 12:05:01 +0200 Message-Id: <20180528100302.656235449@linuxfoundation.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180528100240.256525891@linuxfoundation.org> References: <20180528100240.256525891@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.16-stable review patch. If anyone has any objections, please let me know. ------------------ From: Christophe JAILLET [ Upstream commit 30966861a7a2051457be8c49466887d78cc47e97 ] If an unlikely failure in 'of_get_regulator_init_data()' occurs, we must release the reference on the current 'child' node before returning. Signed-off-by: Christophe JAILLET Signed-off-by: Mark Brown Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- drivers/regulator/of_regulator.c | 1 + 1 file changed, 1 insertion(+) --- a/drivers/regulator/of_regulator.c +++ b/drivers/regulator/of_regulator.c @@ -321,6 +321,7 @@ int of_regulator_match(struct device *de dev_err(dev, "failed to parse DT for regulator %s\n", child->name); + of_node_put(child); return -EINVAL; } match->of_node = of_node_get(child);