Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp2276584imm; Mon, 28 May 2018 05:14:27 -0700 (PDT) X-Google-Smtp-Source: AB8JxZoAvrzlF5TtH7x/2SwXQwH7sbpJvTCGMEi1LmmKOQArfDNtULPLa1H1ffhhFjHFLDjM9ONn X-Received: by 2002:a17:902:22cc:: with SMTP id o12-v6mr13875753plg.38.1527509667678; Mon, 28 May 2018 05:14:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527509667; cv=none; d=google.com; s=arc-20160816; b=EFj1E2Xb15thiE7FEmMlrahBOWXTFzNaLIkxtGCwOgKm4Q/Iad6z3SJIk14UbceCgp D1GwcUIxLt8Jzr9evGcXO7DiztZ9aqTrwLMc0WbVAa9hP+f3YwtxeijWzGveBg9QcL/I djSxE9yxwm8gELKOPZyh7ZkiD87z9bi04OyXKPa8mis2P7SRxrYoUqqNrimfPd5Gzmlw yj9IEliu5ixXAly9tO19sXSM9Fr0gj/vIIldmn/DLUNHY7hQOEH+QGM03UvK/9M6JZUX LQGq/eGL3Bn01fOj3n8jde/a02WnK78rgKbVZZ+ywhYMIkS6KYNG21cAxZ2d61DXLKTd RYlQ== 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=mYyr/NgtSeqBxvwg+e+zfnqUGVCDb/66YDXbjcAewoo=; b=Uj/39bRhTOTI1hdC7hVkXtip0LhKXiaioezseTXAI40t3ksOwBYJhKH73ehCptm21B S0qSd+duStot7G22GqPvEC6a4EOaRpg5kGGP0QBnBvv7VHevINtSuBJd3YUrsoq9REDX YCg24JmBzuHZX0FGOggAYgwlLECAIe44j7VzKWFnYkkQpMY27DQR8ZdCNE3KfXOzhLOA 0abfCpiPzJNAXemMABsli48U/ulOdbbf2Y/UCGEG0AbAzHyLZ3xOqYS3EwT8GjBYVfpq TpUXxa/Ic4JHPm6xwQwbcMMOnGYDtOxKM+ux5g8BMm82ExNA5AIfQVdVN6C/Ky85uAIt iDNw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=fZftAD2r; 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 n10-v6si23347532pgp.457.2018.05.28.05.14.13; Mon, 28 May 2018 05:14:27 -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=fZftAD2r; 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 S1165027AbeE1MNm (ORCPT + 99 others); Mon, 28 May 2018 08:13:42 -0400 Received: from mail.kernel.org ([198.145.29.99]:51168 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1422992AbeE1LED (ORCPT ); Mon, 28 May 2018 07:04:03 -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 3A6DA2075C; Mon, 28 May 2018 11:04:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1527505442; bh=0FszKdoPhKoiTEQ8Y3bL1rAUFE789yDprfYDwTAPrGQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=fZftAD2rquDr+otFc2ueytmE9tlPktQK63fLgNIMaidthoLL/IU8iS77w6YhRfJDO B8xBek78+raCfw8EbsyrJv6b3yv8/GAbRQ7B6vI75EPfdcvMZfZ2ZtNTGDBB824YHh mRHFY7DPyXQdYgNzkrwb7geFOFJIUKodZQ/4Cq6U= 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.14 492/496] regulator: of: Add a missing of_node_put() in an error handling path of of_regulator_match() Date: Mon, 28 May 2018 12:04:37 +0200 Message-Id: <20180528100340.617521095@linuxfoundation.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180528100319.498712256@linuxfoundation.org> References: <20180528100319.498712256@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.14-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 @@ -305,6 +305,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);