video: fbdev: mxc: Release the previously allocated modedb before parsing edid
When we don`t set "video=mxcfb0:dev=hdmi" in bootargs, but connect hdmi to imx6q, it will trigger a periodically hdmi interrupt in a few seconds. These repeated interruptions will read edid and alloc modedb, so we need to release the modedb before the next allocation. Fix following memory leak. unreferenced object 0xc6a54000 (size 2048): comm "kworker/0:0", pid 2655, jiffies 756371 (age 952.680s) hex dump (first 32 bytes): 00 00 00 00 3b 00 00 00 90 06 00 00 1a 04 00 00 ....;........... b5 1a 00 00 18 01 00 00 68 00 00 00 1e 00 00 00 ........h....... backtrace: [<00623f2e>] mxc_edid_parse_ext_blk+0x79c/0x820 [<0ef13c8f>] mxc_edid_read+0x224/0x244 [<68bdc576>] mxc_hdmi_read_edid+0x6c/0x3d0 [<a64a63e8>] hotplug_worker+0x64/0x30c [<909541fa>] process_one_work+0x1f4/0x308 [<69f4c3c3>] worker_thread+0x2b0/0x360 [<7edd79c5>] kthread+0x144/0x150 [<18f0f29a>] ret_from_fork+0x14/0x24 [<00000000>] 0x0 Signed-off-by:Xiaolei Wang <xiaolei.wang@windriver.com> Signed-off-by:
Bruce Ashfield <bruce.ashfield@gmail.com>
Loading
Please register or sign in to comment