summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm
diff options
context:
space:
mode:
authorGuchun Chen <guchunc@codeaurora.org>2018-03-13 12:04:59 +0800
committerGuchun Chen <guchunc@codeaurora.org>2018-03-13 12:06:23 +0800
commit0932f23cdb7f8e4c67846894e4ac551decb4badc (patch)
tree9e848ee785a140a37b339f79c19f5505c7fb21f6 /drivers/gpu/drm
parent1707cb3ff140dec01127669e1c88d5b850f272e4 (diff)
drm: msm: dsi: fix local variable not initialized issue
Local variable in function should be initialized before using it. Change-Id: I061b10913182ed11b7a8cdb1baab900ac7e10ea6 CRs-Fixed: 2202957 Signed-off-by: Guchun Chen <guchunc@codeaurora.org>
Diffstat (limited to 'drivers/gpu/drm')
-rw-r--r--drivers/gpu/drm/msm/dsi-staging/dsi_ctrl.c4
-rw-r--r--drivers/gpu/drm/msm/dsi-staging/dsi_ctrl_hw_1_4.c4
-rw-r--r--drivers/gpu/drm/msm/dsi-staging/dsi_display.c6
3 files changed, 7 insertions, 7 deletions
diff --git a/drivers/gpu/drm/msm/dsi-staging/dsi_ctrl.c b/drivers/gpu/drm/msm/dsi-staging/dsi_ctrl.c
index fb9617ce572a..6015cf35e030 100644
--- a/drivers/gpu/drm/msm/dsi-staging/dsi_ctrl.c
+++ b/drivers/gpu/drm/msm/dsi-staging/dsi_ctrl.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016-2017, The Linux Foundation. All rights reserved.
+ * Copyright (c) 2016-2018, The Linux Foundation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
@@ -1089,7 +1089,7 @@ error:
static int dsi_enable_ulps(struct dsi_ctrl *dsi_ctrl)
{
int rc = 0;
- u32 lanes;
+ u32 lanes = 0;
u32 ulps_lanes;
if (dsi_ctrl->host_config.panel_mode == DSI_OP_CMD_MODE)
diff --git a/drivers/gpu/drm/msm/dsi-staging/dsi_ctrl_hw_1_4.c b/drivers/gpu/drm/msm/dsi-staging/dsi_ctrl_hw_1_4.c
index 2f0f6c2f1b01..caba50832cca 100644
--- a/drivers/gpu/drm/msm/dsi-staging/dsi_ctrl_hw_1_4.c
+++ b/drivers/gpu/drm/msm/dsi-staging/dsi_ctrl_hw_1_4.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015-2017, The Linux Foundation. All rights reserved.
+ * Copyright (c) 2015-2018, The Linux Foundation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
@@ -565,7 +565,7 @@ u32 dsi_ctrl_hw_14_get_cmd_read_data(struct dsi_ctrl_hw *ctrl,
u32 read_cnt;
u32 rx_byte = 0;
u32 repeated_bytes = 0;
- u8 reg[16];
+ u8 reg[16] = {0};
u32 pkt_size = 0;
int buf_offset = read_offset;
diff --git a/drivers/gpu/drm/msm/dsi-staging/dsi_display.c b/drivers/gpu/drm/msm/dsi-staging/dsi_display.c
index f2412daee8b6..09ab14cc4746 100644
--- a/drivers/gpu/drm/msm/dsi-staging/dsi_display.c
+++ b/drivers/gpu/drm/msm/dsi-staging/dsi_display.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016-2017, The Linux Foundation. All rights reserved.
+ * Copyright (c) 2016-2018, The Linux Foundation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
@@ -1481,8 +1481,8 @@ static int dsi_display_dfps_update(struct dsi_display *display,
m_ctrl = &display->ctrl[display->clk_master_idx];
rc = dsi_ctrl_async_timing_update(m_ctrl->ctrl, timing);
if (rc) {
- pr_err("[%s] failed to dfps update host_%d, rc=%d\n",
- display->name, i, rc);
+ pr_err("[%s] failed to dfps update clock master, rc=%d\n",
+ display->name, rc);
goto error;
}