All of lore.kernel.org
 help / color / mirror / Atom feed
From: Liang He <windhl@126.com>
To: laurentiu.palcu@oss.nxp.com, l.stach@pengutronix.de,
	airlied@linux.ie, daniel@ffwll.ch, shawnguo@kernel.org,
	s.hauer@pengutronix.de, festevam@gmail.com, linux-imx@nxp.com,
	dri-devel@lists.freedesktop.org, windhl@126.com
Subject: [PATCH] drm/imx/dcss: Add missing of_node_put() in fail path
Date: Thu,  7 Jul 2022 10:32:14 +0800	[thread overview]
Message-ID: <20220707023214.307451-1-windhl@126.com> (raw)

In dcss_dev_create(), we should call of_node_put() in fail path for
of_graph_get_port_by_id() which will increase the refcount.

Fixes: 9021c317b770 ("drm/imx: Add initial support for DCSS on iMX8MQ")
Signed-off-by: Liang He <windhl@126.com>
---
 drivers/gpu/drm/imx/dcss/dcss-dev.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/gpu/drm/imx/dcss/dcss-dev.c b/drivers/gpu/drm/imx/dcss/dcss-dev.c
index c849533ca83e..a99141538621 100644
--- a/drivers/gpu/drm/imx/dcss/dcss-dev.c
+++ b/drivers/gpu/drm/imx/dcss/dcss-dev.c
@@ -207,6 +207,7 @@ struct dcss_dev *dcss_dev_create(struct device *dev, bool hdmi_output)
 
 	ret = dcss_submodules_init(dcss);
 	if (ret) {
+		of_node_put(dcss->of_port);
 		dev_err(dev, "submodules initialization failed\n");
 		goto clks_err;
 	}
-- 
2.25.1


             reply	other threads:[~2022-07-07  2:34 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-07  2:32 Liang He [this message]
2022-07-14  7:37 ` [PATCH] drm/imx/dcss: Add missing of_node_put() in fail path Laurentiu Palcu
2022-07-14  7:53   ` Liang He

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=20220707023214.307451-1-windhl@126.com \
    --to=windhl@126.com \
    --cc=airlied@linux.ie \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=festevam@gmail.com \
    --cc=l.stach@pengutronix.de \
    --cc=laurentiu.palcu@oss.nxp.com \
    --cc=linux-imx@nxp.com \
    --cc=s.hauer@pengutronix.de \
    --cc=shawnguo@kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.