mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Yang Yingliang <yangyingliang@huawei.com>
To: <linux-kernel@vger.kernel.org>, <dri-devel@lists.freedesktop.org>
Cc: <paul.kocialkowski@bootlin.com>, <airlied@linux.ie>,
	<daniel@ffwll.ch>, <mripard@kernel.org>
Subject: [PATCH -next] drm/logicvc: add missing of_node_put() in logicvc_layers_init()
Date: Tue, 14 Jun 2022 19:21:12 +0800	[thread overview]
Message-ID: <20220614112112.1537319-1-yangyingliang@huawei.com> (raw)

The of_node_put() need be called in error path in logicvc_layers_init().

Fixes: efeeaefe9be5 ("drm: Add support for the LogiCVC display controller")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
---
 drivers/gpu/drm/logicvc/logicvc_layer.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/logicvc/logicvc_layer.c b/drivers/gpu/drm/logicvc/logicvc_layer.c
index bae1c7f99569..00a37563a6dc 100644
--- a/drivers/gpu/drm/logicvc/logicvc_layer.c
+++ b/drivers/gpu/drm/logicvc/logicvc_layer.c
@@ -610,8 +610,11 @@ int logicvc_layers_init(struct logicvc_drm *logicvc)
 		}
 
 		ret = logicvc_layer_init(logicvc, layer_node, index);
-		if (ret)
+		if (ret) {
+			of_node_put(layer_node);
+			of_node_put(layers_node);
 			goto error;
+		}
 
 		of_node_put(layer_node);
 	}
-- 
2.25.1


             reply	other threads:[~2022-06-14 11:10 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-14 11:21 Yang Yingliang [this message]
2022-06-24 14:36 ` Paul Kocialkowski
2022-06-24 15:25   ` Paul Kocialkowski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220614112112.1537319-1-yangyingliang@huawei.com \
    --to=yangyingliang@huawei.com \
    --cc=airlied@linux.ie \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mripard@kernel.org \
    --cc=paul.kocialkowski@bootlin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®