* [PATCH] drm/gma500: fix memory/resource leaks
@ 2019-08-19 4:06 Wenwen Wang
0 siblings, 0 replies; only message in thread
From: Wenwen Wang @ 2019-08-19 4:06 UTC (permalink / raw)
To: Wenwen Wang
Cc: Patrik Jakobsson, David Airlie, Daniel Vetter, dri-devel, open list
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@cs.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
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2019-08-19 4:06 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-19 4:06 [PATCH] drm/gma500: fix memory/resource leaks Wenwen Wang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).