Message ID | 20230602020502.11693-1-hayashi.kunihiko@socionext.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp748414vqr; Thu, 1 Jun 2023 19:29:36 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4XR1Mq83KmGxnkoHvXezQ1YUubp+SW7P+u56MBzHYqJZ/yPsafTWolPHhuIRipl/Oqsdu0 X-Received: by 2002:a05:6a21:3018:b0:107:1805:feea with SMTP id yd24-20020a056a21301800b001071805feeamr8996034pzb.37.1685672976112; Thu, 01 Jun 2023 19:29:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685672976; cv=none; d=google.com; s=arc-20160816; b=AUJPrIWDrglVSi14ejuLRT/SQfW7ju/ovrsrXeSbaM52ZU7OXqZEbRUtamawR8j71K jUFeHzXons0tFrzWQqD1mgh/pWiTnyXiZWprYV6JvZd9nseCeKOc62X1+Mrdoyrya7tQ rBVtd6aekboDLVoN8tPXTq8mxmVkAxd41+/qgHZY+2S/r1yZXunFnTilBsnqbVmzSRl1 key3cvQTDYDtrCMvvx+wYbJPb8S+0mORR+4slHjJo2QhDFdIpnWBDbVZVKcAzfU8gHSN +Xlx+UZFYMCsyMrnkbIrrv8cxDlOY6VSUOwlnhA97XS/PQyWgS2v7T4VBfS/QFoWEP5A OAuw== 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 :message-id:date:subject:cc:to:from; bh=01NxpTnkY9GyxU2H/tt4vIebzaZ+NHkMV9+PzmMm4dA=; b=oJwGEyiWGmSLJAKE3YZyEzQ3+zF/miaYkx/MUTB80d4I/l/o150fsaRmKaTwyqInr9 qP/5CoexQXlwA0JqHMD83x16rtviNwUWtr1kLfg/bIwZnu4snlY2rOSuroqfK4TU+9kt LVQUPYYgWROcKhL1gWpTCQqFAnuFdpWaNG5nnfpz+NM94WqfXmKKbR6032t3CbB1QzP3 kQYBm/oCwM8aDd/OUX0n7/y786ViqtEWtXgmWMSfx8nhcbNo6Z8OQNL696fnq8Z6JZdj t7PtUFxTvYT2bN2L9xRCkaXLrCCzXhW6QL652nTR7SaFW2Lyc1hvATXeIUj4pSCVjOXh 5npQ== ARC-Authentication-Results: i=1; mx.google.com; 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id m7-20020a625807000000b0064d56036aeasi6244786pfb.255.2023.06.01.19.29.19; Thu, 01 Jun 2023 19:29:36 -0700 (PDT) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233404AbjFBCFO (ORCPT <rfc822;limurcpp@gmail.com> + 99 others); Thu, 1 Jun 2023 22:05:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42166 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232885AbjFBCFN (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 1 Jun 2023 22:05:13 -0400 Received: from mx.socionext.com (mx.socionext.com [202.248.49.38]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 837B1138; Thu, 1 Jun 2023 19:05:10 -0700 (PDT) Received: from unknown (HELO iyokan2-ex.css.socionext.com) ([172.31.9.54]) by mx.socionext.com with ESMTP; 02 Jun 2023 11:05:09 +0900 Received: from mail.mfilter.local (mail-arc02.css.socionext.com [10.213.46.40]) by iyokan2-ex.css.socionext.com (Postfix) with ESMTP id 50F6F218C00D; Fri, 2 Jun 2023 11:05:09 +0900 (JST) Received: from kinkan2.css.socionext.com ([172.31.9.51]) by m-FILTER with ESMTP; Fri, 2 Jun 2023 11:05:09 +0900 Received: from plum.e01.socionext.com (unknown [10.212.243.119]) by kinkan2.css.socionext.com (Postfix) with ESMTP id 95FF9B6CEB; Fri, 2 Jun 2023 11:05:08 +0900 (JST) From: Kunihiko Hayashi <hayashi.kunihiko@socionext.com> To: Rob Herring <robh+dt@kernel.org>, Frank Rowand <frowand.list@gmail.com> Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Kunihiko Hayashi <hayashi.kunihiko@socionext.com> Subject: [PATCH] of: overlay: Fix missing of_node_put() in error case of init_overlay_changeset() Date: Fri, 2 Jun 2023 11:05:02 +0900 Message-Id: <20230602020502.11693-1-hayashi.kunihiko@socionext.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1767556226500578471?= X-GMAIL-MSGID: =?utf-8?q?1767556226500578471?= |
Series |
of: overlay: Fix missing of_node_put() in error case of init_overlay_changeset()
|
|
Commit Message
Kunihiko Hayashi
June 2, 2023, 2:05 a.m. UTC
In init_overlay_changeset(), the variable "node" is from
of_get_child_by_name(), and the "node" should be discarded in error case.
Fixes: d1651b03c2df ("of: overlay: add overlay symbols to live device tree")
Signed-off-by: Kunihiko Hayashi <hayashi.kunihiko@socionext.com>
---
drivers/of/overlay.c | 1 +
1 file changed, 1 insertion(+)
Comments
On Fri, 02 Jun 2023 11:05:02 +0900, Kunihiko Hayashi wrote: > In init_overlay_changeset(), the variable "node" is from > of_get_child_by_name(), and the "node" should be discarded in error case. > > Fixes: d1651b03c2df ("of: overlay: add overlay symbols to live device tree") > Signed-off-by: Kunihiko Hayashi <hayashi.kunihiko@socionext.com> > --- > drivers/of/overlay.c | 1 + > 1 file changed, 1 insertion(+) > Applied, thanks!
diff --git a/drivers/of/overlay.c b/drivers/of/overlay.c index 2e01960f1aeb..7feb643f1370 100644 --- a/drivers/of/overlay.c +++ b/drivers/of/overlay.c @@ -811,6 +811,7 @@ static int init_overlay_changeset(struct overlay_changeset *ovcs) if (!fragment->target) { pr_err("symbols in overlay, but not in live tree\n"); ret = -EINVAL; + of_node_put(node); goto err_out; }