From: Dejin Zheng <zhengdejin5@gmail.com>
To: kraxel@redhat.com, airlied@linux.ie, daniel@ffwll.ch,
virtualization@lists.linux-foundation.org,
dri-devel@lists.freedesktop.org
Cc: linux-kernel@vger.kernel.org, Dejin Zheng <zhengdejin5@gmail.com>,
Andy Shevchenko <andy.shevchenko@gmail.com>
Subject: [PATCH v1] drm/bochs: fix an issue of ioremap() leak
Date: Wed, 22 Apr 2020 00:45:43 +0800 [thread overview]
Message-ID: <20200421164543.16605-1-zhengdejin5@gmail.com> (raw)
It forgot to call bochs_hw_fini() to release related resources when
bochs_pci_probe() fail. eg: io virtual address get by ioremap().
Fixes: 81da8c3b8d3df6 ("drm/bochs: add drm_driver.release callback.")
CC: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Dejin Zheng <zhengdejin5@gmail.com>
---
drivers/gpu/drm/bochs/bochs_drv.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/gpu/drm/bochs/bochs_drv.c b/drivers/gpu/drm/bochs/bochs_drv.c
index addb0568c1af..210a60135c8a 100644
--- a/drivers/gpu/drm/bochs/bochs_drv.c
+++ b/drivers/gpu/drm/bochs/bochs_drv.c
@@ -138,6 +138,7 @@ static int bochs_pci_probe(struct pci_dev *pdev,
return ret;
err_unload:
+ bochs_hw_fini(dev);
bochs_unload(dev);
err_free_dev:
drm_dev_put(dev);
--
2.25.0
next reply other threads:[~2020-04-21 16:45 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-21 16:45 Dejin Zheng [this message]
2020-04-21 17:24 ` [PATCH v1] drm/bochs: fix an issue of ioremap() leak Andy Shevchenko
2020-04-22 13:52 ` Dejin Zheng
2020-04-22 14:40 ` Andy Shevchenko
2020-04-22 15:21 ` Dejin Zheng
2020-04-23 10:14 ` Gerd Hoffmann
2020-04-23 14:14 ` Dejin Zheng
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=20200421164543.16605-1-zhengdejin5@gmail.com \
--to=zhengdejin5@gmail.com \
--cc=airlied@linux.ie \
--cc=andy.shevchenko@gmail.com \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=kraxel@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=virtualization@lists.linux-foundation.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).