[<prev] [next>] [day] [month] [year] [list]
Message-Id: <1566187591-8263-1-git-send-email-wenwen@cs.uga.edu>
Date: Sun, 18 Aug 2019 23:06:17 -0500
From: Wenwen Wang <wenwen@...uga.edu>
To: Wenwen Wang <wenwen@...uga.edu>
Cc: Patrik Jakobsson <patrik.r.jakobsson@...il.com>,
David Airlie <airlied@...ux.ie>,
Daniel Vetter <daniel@...ll.ch>,
dri-devel@...ts.freedesktop.org,
linux-kernel@...r.kernel.org (open list)
Subject: [PATCH] drm/gma500: fix memory/resource leaks
In psb_driver_load(), if gma_backlight_init() fails, no cleanup is
executed, leading to memory/resource leaks. To fix this issue, go to the
'out_err' label to perform the cleanup work.
Signed-off-by: Wenwen Wang <wenwen@...uga.edu>
---
drivers/gpu/drm/gma500/psb_drv.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/gma500/psb_drv.c b/drivers/gpu/drm/gma500/psb_drv.c
index 7005f8f..8d264ad 100644
--- a/drivers/gpu/drm/gma500/psb_drv.c
+++ b/drivers/gpu/drm/gma500/psb_drv.c
@@ -383,7 +383,7 @@ static int psb_driver_load(struct drm_device *dev, unsigned long flags)
}
if (ret)
- return ret;
+ goto out_err;
psb_intel_opregion_enable_asle(dev);
#if 0
/* Enable runtime pm at last */
--
2.7.4
Powered by blists - more mailing lists