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

Commit 209745d9 authored by Veera Sundaram Sankaran's avatar Veera Sundaram Sankaran
Browse files

msm: mdss: Fix possible null dereferencing



Fixed null dereferencing in dsi and hdmi

Change-Id: I6401a1e0c1bbfc50a4e31615716e42ad8b666d46
Signed-off-by: default avatarVeera Sundaram Sankaran <veeras@codeaurora.org>
parent 169417fe
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1809,7 +1809,7 @@ int dsi_panel_device_register(struct device_node *pan_node,
		if (!res || res->start == 0) {
			pr_err("%s:%d unable to get the MDSS irq resources\n",
							__func__, __LINE__);
			rc = -ENODEV;
			return -ENODEV;
		}
		rc = mdss_dsi_irq_init(&ctrl_pdev->dev, res->start, ctrl_pdata);
		if (rc) {
+4 −2
Original line number Diff line number Diff line
@@ -494,12 +494,13 @@ static inline u32 hdmi_tx_is_dvi_mode(struct hdmi_tx_ctrl *hdmi_ctrl)
static inline void hdmi_tx_send_cable_notification(
	struct hdmi_tx_ctrl *hdmi_ctrl, int val)
{
	int state = hdmi_ctrl->sdev.state;
	int state = 0;

	if (!hdmi_ctrl) {
		DEV_ERR("%s: invalid input\n", __func__);
		return;
	}
	state = hdmi_ctrl->sdev.state;

	switch_set_state(&hdmi_ctrl->sdev, val);

@@ -515,12 +516,13 @@ static inline void hdmi_tx_send_cable_notification(
static inline void hdmi_tx_set_audio_switch_node(
	struct hdmi_tx_ctrl *hdmi_ctrl, int val)
{
	int state = hdmi_ctrl->audio_sdev.state;
	int state = 0;

	if (!hdmi_ctrl) {
		DEV_ERR("%s: invalid input\n", __func__);
		return;
	}
	state = hdmi_ctrl->audio_sdev.state;

	if (!hdmi_tx_is_dvi_mode(hdmi_ctrl)) {
		switch_set_state(&hdmi_ctrl->audio_sdev, val);