msm: mdss: Fix possible null dereferencing
Fixed null dereferencing in dsi and hdmi Change-Id: I6401a1e0c1bbfc50a4e31615716e42ad8b666d46 Signed-off-by: Veera Sundaram Sankaran <veeras@codeaurora.org>
This commit is contained in:
parent
19a0721e64
commit
124d54455f
2 changed files with 5 additions and 3 deletions
|
@ -1819,7 +1819,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) {
|
||||
|
|
|
@ -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) &&
|
||||
hdmi_tx_is_cea_format(hdmi_ctrl->video_resolution)) {
|
||||
|
|
Loading…
Add table
Reference in a new issue