* [PATCH] drm/gma500: Fix refcount leak in oaktrail_hdmi_setup
@ 2025-12-11 15:27 Miaoqian Lin
0 siblings, 0 replies; only message in thread
From: Miaoqian Lin @ 2025-12-11 15:27 UTC (permalink / raw)
To: Patrik Jakobsson, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter, Alan Cox,
Dave Airlie, dri-devel, linux-kernel
Cc: linmq006, stable
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2025-12-11 15:28 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-12-11 15:27 [PATCH] drm/gma500: Fix refcount leak in oaktrail_hdmi_setup Miaoqian Lin
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®