From: Miaoqian Lin <linmq006@gmail.com>
To: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>,
Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
Maxime Ripard <mripard@kernel.org>,
Thomas Zimmermann <tzimmermann@suse.de>,
David Airlie <airlied@gmail.com>, Simona Vetter <simona@ffwll.ch>,
Alan Cox <alan@linux.intel.com>, Dave Airlie <airlied@redhat.com>,
dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org
Cc: linmq006@gmail.com, stable@vger.kernel.org
Subject: [PATCH] drm/gma500: Fix refcount leak in oaktrail_hdmi_setup
Date: Thu, 11 Dec 2025 19:27:59 +0400 [thread overview]
Message-ID: <20251211152759.2421435-1-linmq006@gmail.com> (raw)
pci_get_device() increments the reference count on the PCI device.
Add missing pci_dev_put() in error paths to fix refcount leak.
Found via static analysis and code review.
Fixes: 1b082ccf5901 ("gma500: Add Oaktrail support")
Cc: stable@vger.kernel.org
Signed-off-by: Miaoqian Lin <linmq006@gmail.com>
---
drivers/gpu/drm/gma500/oaktrail_hdmi.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/gma500/oaktrail_hdmi.c b/drivers/gpu/drm/gma500/oaktrail_hdmi.c
index 20d027d552c7..2be12acc93d2 100644
--- a/drivers/gpu/drm/gma500/oaktrail_hdmi.c
+++ b/drivers/gpu/drm/gma500/oaktrail_hdmi.c
@@ -712,10 +712,10 @@ void oaktrail_hdmi_setup(struct drm_device *dev)
dev_info(dev->dev, "HDMI hardware present.\n");
return;
-
free:
kfree(hdmi_dev);
out:
+ pci_dev_put(pdev);
return;
}
--
2.25.1
reply other threads:[~2025-12-11 15:28 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20251211152759.2421435-1-linmq006@gmail.com \
--to=linmq006@gmail.com \
--cc=airlied@gmail.com \
--cc=airlied@redhat.com \
--cc=alan@linux.intel.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mripard@kernel.org \
--cc=patrik.r.jakobsson@gmail.com \
--cc=simona@ffwll.ch \
--cc=stable@vger.kernel.org \
--cc=tzimmermann@suse.de \
/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®