* [PATCH 1/5] fbdev: sh_mobile_hdmi: properly clean up modedb on
@ 2010-11-04 11:05 Guennadi Liakhovetski
0 siblings, 0 replies; only message in thread
From: Guennadi Liakhovetski @ 2010-11-04 11:05 UTC (permalink / raw)
To: linux-fbdev
Even though this is not a problem currently, it is better to clear the freed
pointer and nullify the length of the freed memory.
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
---
drivers/video/sh_mobile_hdmi.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/drivers/video/sh_mobile_hdmi.c b/drivers/video/sh_mobile_hdmi.c
index b3241dd..dadb632 100644
--- a/drivers/video/sh_mobile_hdmi.c
+++ b/drivers/video/sh_mobile_hdmi.c
@@ -1130,6 +1130,10 @@ static void sh_hdmi_edid_work_fn(struct work_struct *work)
if (!hdmi->info)
goto out;
+ hdmi->monspec.modedb_len = 0;
+ fb_destroy_modedb(hdmi->monspec.modedb);
+ hdmi->monspec.modedb = NULL;
+
acquire_console_sem();
/* HDMI disconnect */
@@ -1137,7 +1141,6 @@ static void sh_hdmi_edid_work_fn(struct work_struct *work)
release_console_sem();
pm_runtime_put(hdmi->dev);
- fb_destroy_modedb(hdmi->monspec.modedb);
}
out:
--
1.7.2.3
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2010-11-04 11:05 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-11-04 11:05 [PATCH 1/5] fbdev: sh_mobile_hdmi: properly clean up modedb on Guennadi Liakhovetski
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).