diff options
author | Guennadi Liakhovetski <g.liakhovetski@gmx.de> | 2010-11-04 07:05:55 -0400 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2010-11-10 02:53:12 -0500 |
commit | 91d63f8a306722dbf1b400d4afb11f69512977ad (patch) | |
tree | 42476b3fc65b4e3efbcb43f635c01c0894b352ba /drivers/video | |
parent | a7bcf21e60c73cb7f7c13fad928967d7e47c3cac (diff) |
fbdev: sh_mobile_hdmi: properly clean up modedb on monitor unplug
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>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'drivers/video')
-rw-r--r-- | 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 55b3077ff6ff..d7df10315d8d 100644 --- a/drivers/video/sh_mobile_hdmi.c +++ b/drivers/video/sh_mobile_hdmi.c | |||
@@ -1071,6 +1071,10 @@ static void sh_hdmi_edid_work_fn(struct work_struct *work) | |||
1071 | if (!hdmi->info) | 1071 | if (!hdmi->info) |
1072 | goto out; | 1072 | goto out; |
1073 | 1073 | ||
1074 | hdmi->monspec.modedb_len = 0; | ||
1075 | fb_destroy_modedb(hdmi->monspec.modedb); | ||
1076 | hdmi->monspec.modedb = NULL; | ||
1077 | |||
1074 | acquire_console_sem(); | 1078 | acquire_console_sem(); |
1075 | 1079 | ||
1076 | /* HDMI disconnect */ | 1080 | /* HDMI disconnect */ |
@@ -1078,7 +1082,6 @@ static void sh_hdmi_edid_work_fn(struct work_struct *work) | |||
1078 | 1082 | ||
1079 | release_console_sem(); | 1083 | release_console_sem(); |
1080 | pm_runtime_put(hdmi->dev); | 1084 | pm_runtime_put(hdmi->dev); |
1081 | fb_destroy_modedb(hdmi->monspec.modedb); | ||
1082 | } | 1085 | } |
1083 | 1086 | ||
1084 | out: | 1087 | out: |