Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9b75f766 authored by Tatenda Chipeperekwa's avatar Tatenda Chipeperekwa
Browse files

msm: mdss: hdmi: fix potential null deference errors



Fix errors in HDMI and HDCP 2.2 driver code that are
related to potential null pointer deferencing and use of
uninitialized variables.

CRs-Fixed: 1026671
Change-Id: Iecf3d1fe5d5268f043617b3fa920fa97bd05f046
Signed-off-by: default avatarTatenda Chipeperekwa <tatendac@codeaurora.org>
parent 57b7f613
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -666,7 +666,7 @@ static void hdmi_hdcp2p2_link_cb(void *data)

static void hdmi_hdcp2p2_recv_msg(struct hdmi_hdcp2p2_ctrl *ctrl)
{
	int rc, timeout_hsync;
	int rc = 0, timeout_hsync;
	char *recvd_msg_buf = NULL;
	struct hdmi_tx_hdcp2p2_ddc_data *ddc_data;
	struct hdmi_tx_ddc_ctrl *ddc_ctrl;
+14 −2
Original line number Diff line number Diff line
@@ -2883,13 +2883,19 @@ static inline void hdmi_tx_audio_off(struct hdmi_tx_ctrl *hdmi_ctrl)
static int hdmi_tx_power_off(struct hdmi_tx_ctrl *hdmi_ctrl)
{
	struct dss_io_data *io = NULL;
	void *pdata = hdmi_tx_get_fd(HDMI_TX_FEAT_PANEL);
	void *pdata =  NULL;

	if (!hdmi_ctrl) {
		DEV_ERR("%s: invalid input\n", __func__);
		return -EINVAL;
	}

	pdata = hdmi_tx_get_fd(HDMI_TX_FEAT_PANEL);
	if (!pdata) {
		DEV_ERR("%s: invalid panel data\n", __func__);
		return -EINVAL;
	}

	io = &hdmi_ctrl->pdata.io[HDMI_TX_CORE_IO];
	if (!io->base) {
		DEV_ERR("%s: Core io is not initialized\n", __func__);
@@ -3451,7 +3457,7 @@ static char *hdmi_tx_get_event_name(int event)

static void hdmi_tx_update_fps(struct hdmi_tx_ctrl *hdmi_ctrl)
{
	void *pdata = pdata = hdmi_tx_get_fd(HDMI_TX_FEAT_PANEL);
	void *pdata = NULL;
	struct mdss_panel_info *pinfo;

	if (!hdmi_ctrl) {
@@ -3459,6 +3465,12 @@ static void hdmi_tx_update_fps(struct hdmi_tx_ctrl *hdmi_ctrl)
		return;
	}

	pdata = hdmi_tx_get_fd(HDMI_TX_FEAT_PANEL);
	if (!pdata) {
		DEV_ERR("%s: invalid panel data\n", __func__);
		return;
	}

	pinfo = &hdmi_ctrl->panel_data.panel_info;

	if (!pinfo->dynamic_fps) {