hdmitx: fix a resmue panic isse [1/1]
authorZongdong Jiao <zongdong.jiao@amlogic.com>
Thu, 13 Dec 2018 05:31:27 +0000 (13:31 +0800)
committerJianxin Pan <jianxin.pan@amlogic.com>
Thu, 13 Dec 2018 11:00:18 +0000 (03:00 -0800)
PD#SWPL-3188

Problem:
When HDMI cable is not connected(that is CVBS out), and system
may be panic after resume.

Solution:
Add NULL pointer protection check

Verify:
P212

Change-Id: I60818faaf7049667501e31990fa557b754ea7f1b
Signed-off-by: Zongdong Jiao <zongdong.jiao@amlogic.com>
drivers/amlogic/media/vout/hdmitx/hdmi_tx_20/hdmi_tx_main.c

index 1490ac9..9493a00 100644 (file)
@@ -165,7 +165,7 @@ static void hdmitx_late_resume(struct early_suspend *h)
        if (phdmi->hdmitx_clk_tree.hdmi_clk_vpu != NULL)
                clk_prepare_enable(phdmi->hdmitx_clk_tree.hdmi_clk_vpu);
 
-       if (hdmitx_is_hdmi_vmode(info->name) == 1)
+       if (info && (hdmitx_is_hdmi_vmode(info->name) == 1))
                phdmi->HWOp.CntlMisc(&hdmitx_device, MISC_HPLL_FAKE, 0);
 
        phdmi->hpd_lock = 0;