drm/gma500: Fix refcount leak in oaktrail_hdmi_setup
Subsystems (4)
PATCH 1/1 drm/gma500: Fix refcount leak in oaktrail_hdmi_setup
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")
Signed-off-by Miaoqian Lin <[email protected]>
--- drivers/gpu/drm/gma500/oaktrail_hdmi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/gma500/oaktrail_hdmi.c +1 -1
@@ -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 ; }
Signature · 1 line
2.25.1