From: Hoegeun Kwon <hoegeun.kwon@samsung.com>
To: maxime@cerno.tech, eric@anholt.net, airlied@linux.ie,
daniel@ffwll.ch, robh+dt@kernel.org
Cc: devicetree@vger.kernel.org, sungguk.na@samsung.com,
dave.stevenson@raspberrypi.com, linux-kernel@vger.kernel.org,
dri-devel@lists.freedesktop.org,
bcm-kernel-feedback-list@broadcom.com,
linux-rpi-kernel@lists.infradead.org, hoegeun.kwon@samsung.com,
linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/1] drm/vc4: drv: Add error handding for bind
Date: Tue, 27 Oct 2020 13:14:42 +0900 [thread overview]
Message-ID: <20201027041442.30352-2-hoegeun.kwon@samsung.com> (raw)
In-Reply-To: <20201027041442.30352-1-hoegeun.kwon@samsung.com>
There is a problem that if vc4_drm bind fails, a memory leak occurs on
the drm_property_create side. Add error handding for drm_mode_config.
Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
---
drivers/gpu/drm/vc4/vc4_drv.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/gpu/drm/vc4/vc4_drv.c b/drivers/gpu/drm/vc4/vc4_drv.c
index f1a5fd5dab6f..a17aa1db11b6 100644
--- a/drivers/gpu/drm/vc4/vc4_drv.c
+++ b/drivers/gpu/drm/vc4/vc4_drv.c
@@ -314,6 +314,7 @@ static int vc4_drm_bind(struct device *dev)
component_unbind_all(dev, drm);
gem_destroy:
vc4_gem_destroy(drm);
+ drm_mode_config_cleanup(drm);
vc4_bo_cache_destroy(drm);
dev_put:
drm_dev_put(drm);
--
2.17.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2020-10-27 4:17 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20201027041534epcas1p22f6b232a4d6be92dcc807f28baedab44@epcas1p2.samsung.com>
2020-10-27 4:14 ` [PATCH 0/1] drm/vc4: drv: Add error handding for bind Hoegeun Kwon
2020-10-27 4:14 ` Hoegeun Kwon [this message]
2020-10-27 14:54 ` [PATCH 1/1] " Maxime Ripard
2020-10-28 11:29 ` Daniel Vetter
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=20201027041442.30352-2-hoegeun.kwon@samsung.com \
--to=hoegeun.kwon@samsung.com \
--cc=airlied@linux.ie \
--cc=bcm-kernel-feedback-list@broadcom.com \
--cc=daniel@ffwll.ch \
--cc=dave.stevenson@raspberrypi.com \
--cc=devicetree@vger.kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=eric@anholt.net \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rpi-kernel@lists.infradead.org \
--cc=maxime@cerno.tech \
--cc=robh+dt@kernel.org \
--cc=sungguk.na@samsung.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