From 75c241ee6a1cdf81b2dc54f655dda02bae1e3f74 Mon Sep 17 00:00:00 2001 From: Yi Zhou Date: Tue, 20 Mar 2018 17:30:41 +0800 Subject: [PATCH] hdmitx: fix a null pointer in hdmitx_late_resume function PD#162465: hdmitx: fix a null pointer in hdmitx_late_resume function Change-Id: Ib4b3f55d2ca8274fb4c1000cf79f403006d7a475 Signed-off-by: Yi Zhou --- drivers/amlogic/media/vout/hdmitx/hdmi_tx_20/hdmi_tx_main.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/drivers/amlogic/media/vout/hdmitx/hdmi_tx_20/hdmi_tx_main.c b/drivers/amlogic/media/vout/hdmitx/hdmi_tx_20/hdmi_tx_main.c index ec37f99..f827ecc 100644 --- a/drivers/amlogic/media/vout/hdmitx/hdmi_tx_20/hdmi_tx_main.c +++ b/drivers/amlogic/media/vout/hdmitx/hdmi_tx_20/hdmi_tx_main.c @@ -158,11 +158,17 @@ static void hdmitx_late_resume(struct early_suspend *h) /*open vpu clk*/ if (phdmi->hdmitx_clk_tree.hdmi_clk_vapb != NULL) clk_prepare_enable(phdmi->hdmitx_clk_tree.hdmi_clk_vapb); + if (phdmi->hdmitx_clk_tree.hdmi_clk_vpu != NULL) clk_prepare_enable(phdmi->hdmitx_clk_tree.hdmi_clk_vpu); - if (info && (strncmp(info->name, "panel", 5) == 0 || - strncmp(info->name, "null", 4) == 0)) { + if ((info == NULL) || (info->name == NULL)) { + pr_info(SYS "vinfo is NULL\n"); + return; + } + + if (strncmp(info->name, "panel", 5) == 0 || + strncmp(info->name, "null", 4) == 0) { ; } else { if (hdmitx_is_hdmi_vmode(info->name) == 1) -- 2.7.4