From: Sasha Levin <sashal@kernel.org>
To: linux-kernel@vger.kernel.org, stable@vger.kernel.org
Cc: Sasha Levin <sashal@kernel.org>,
Julia Lawall <Julia.Lawall@lip6.fr>,
Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>,
linux-renesas-soc@vger.kernel.org,
dri-devel@lists.freedesktop.org
Subject: [PATCH AUTOSEL 4.19 123/192] drm: rcar-du: add missing of_node_put
Date: Wed, 27 Mar 2019 14:09:15 -0400 [thread overview]
Message-ID: <20190327181025.13507-123-sashal@kernel.org> (raw)
In-Reply-To: <20190327181025.13507-1-sashal@kernel.org>
From: Julia Lawall <julia.lawall@lip6.fr>
[ Upstream commit 4c6d8fc20b09f9684743afd72e4dbc3f15524479 ]
Add an of_node_put when the result of of_graph_get_remote_port_parent is
not available.
Add a second of_node_put if no encoder is selected (encoder remains NULL).
The semantic match that finds the first problem is as follows
(http://coccinelle.lip6.fr):
// <smpl>
@r exists@
local idexpression e;
expression x;
@@
e = of_graph_get_remote_port_parent(...);
... when != x = e
when != true e == NULL
when != of_node_put(e)
when != of_fwnode_handle(e)
(
return e;
|
*return ...;
)
// </smpl>
Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/gpu/drm/rcar-du/rcar_du_kms.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/gpu/drm/rcar-du/rcar_du_kms.c b/drivers/gpu/drm/rcar-du/rcar_du_kms.c
index fb46df56f0c4..0386b454e221 100644
--- a/drivers/gpu/drm/rcar-du/rcar_du_kms.c
+++ b/drivers/gpu/drm/rcar-du/rcar_du_kms.c
@@ -300,6 +300,7 @@ static int rcar_du_encoders_init_one(struct rcar_du_device *rcdu,
dev_dbg(rcdu->dev,
"connected entity %pOF is disabled, skipping\n",
entity);
+ of_node_put(entity);
return -ENODEV;
}
@@ -335,6 +336,7 @@ static int rcar_du_encoders_init_one(struct rcar_du_device *rcdu,
dev_warn(rcdu->dev,
"no encoder found for endpoint %pOF, skipping\n",
ep->local_node);
+ of_node_put(entity);
return -ENODEV;
}
--
2.19.1
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2019-03-27 18:14 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20190327181025.13507-1-sashal@kernel.org>
2019-03-27 18:08 ` [PATCH AUTOSEL 4.19 079/192] drm/amd/display: Clear stream->mode_changed after commit Sasha Levin
2019-03-27 18:08 ` [PATCH AUTOSEL 4.19 102/192] drm: allow render capable master with DRM_AUTH ioctls Sasha Levin
2019-03-27 18:09 ` [PATCH AUTOSEL 4.19 121/192] fbdev: fbmem: fix memory access if logo is bigger than the screen Sasha Levin
2019-03-27 18:09 ` Sasha Levin [this message]
2019-03-27 18:09 ` [PATCH AUTOSEL 4.19 125/192] drm/amd/display: Disconnect mpcc when changing tg Sasha Levin
2019-03-27 18:09 ` [PATCH AUTOSEL 4.19 138/192] drm/vkms: Bugfix extra vblank frame Sasha Levin
2019-03-27 18:09 ` [PATCH AUTOSEL 4.19 150/192] backlight: pwm_bl: Use gpiod_get_value_cansleep() to get initial state Sasha Levin
[not found] ` <20190327181025.13507-1-sashal-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2019-03-27 18:09 ` [PATCH AUTOSEL 4.19 124/192] drm/amd/display: Don't re-program planes for DPMS changes Sasha Levin
2019-03-27 18:09 ` [PATCH AUTOSEL 4.19 153/192] drm/amd/display: Enable vblank interrupt during CRC capture Sasha Levin
2019-03-27 18:10 ` [PATCH AUTOSEL 4.19 176/192] drm: Auto-set allow_fb_modifiers when given modifiers at plane init Sasha Levin
2019-03-27 18:10 ` [PATCH AUTOSEL 4.19 177/192] drm/nouveau: Stop using drm_crtc_force_disable Sasha Levin
2019-03-27 18:10 ` [PATCH AUTOSEL 4.19 183/192] drm/fb-helper: fix leaks in error path of drm_fb_helper_fbdev_setup Sasha Levin
2019-03-27 18:10 ` [PATCH AUTOSEL 4.19 188/192] drm: Reorder set_property_atomic to avoid returning with an active ww_ctx Sasha Levin
2019-03-27 18:10 ` [PATCH AUTOSEL 4.19 189/192] drm/dp/mst: Configure no_stop_bit correctly for remote i2c xfers Sasha Levin
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=20190327181025.13507-123-sashal@kernel.org \
--to=sashal@kernel.org \
--cc=Julia.Lawall@lip6.fr \
--cc=dri-devel@lists.freedesktop.org \
--cc=laurent.pinchart+renesas@ideasonboard.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=stable@vger.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).