If kzalloc_obj() or pci_enable_device() or ioremap() fails, the PCI device reference obtained by pci_get_device() is not released. Drop the reference on the error paths. Fixes: 1b082ccf5901 ("gma500: Add Oaktrail support") Cc: stable@vger.kernel.org Signed-off-by: Wentao Liang --- drivers/gpu/drm/gma500/oaktrail_hdmi.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/gma500/oaktrail_hdmi.c b/drivers/gpu/drm/gma500/oaktrail_hdmi.c index 403d21cbb3a2..09fc50fb6f7b 100644 --- a/drivers/gpu/drm/gma500/oaktrail_hdmi.c +++ b/drivers/gpu/drm/gma500/oaktrail_hdmi.c @@ -717,6 +717,7 @@ void oaktrail_hdmi_setup(struct drm_device *dev) free: kfree(hdmi_dev); out: + pci_dev_put(pdev); return; } -- 2.34.1