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)
committerLuan Yuan <luan.yuan@amlogic.com>
Thu, 13 Dec 2018 11:44:17 +0000 (19:44 +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 5705066..9acd7f9 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;