summaryrefslogtreecommitdiffstats
path: root/drivers/video/tegra/dc/dsi.c
diff options
context:
space:
mode:
authorJay Bhukhanwala <jbhukhanwala@nvidia.com>2017-03-14 18:18:41 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2017-04-03 03:55:38 -0400
commitb0384b25a03112953566a40ed8317c5c01cad8ed (patch)
tree0dd02d0b89ae030cd4bb8e2d07f21a4627426506 /drivers/video/tegra/dc/dsi.c
parentfcbedfe0b33b44b4a76c181f65e60d9ddd811bf9 (diff)
video: tegra: dc: Fix several coverity defects
Below is the full list of CIDs and brief explanation for each: CID 32021: Dereference before NULL check in tegra_fb_register CID 37876: Division or modulo by zero in tegra_dsi_get_shift_clk_div CID 38601: Dereference after NULL check in _tegra_dc_controller_disable CID 38907: Structurally dead code, in tegra_dc_is_powered Bug 200192413 TDS-1898 Change-Id: I48f104c5fee497e18652786d6b3e4bdec23eb1b0 Reviewed-on: http://git-master/r/1320802 Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/video/tegra/dc/dsi.c')
-rw-r--r--drivers/video/tegra/dc/dsi.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/video/tegra/dc/dsi.c b/drivers/video/tegra/dc/dsi.c
index 071abe2ad..801a998f4 100644
--- a/drivers/video/tegra/dc/dsi.c
+++ b/drivers/video/tegra/dc/dsi.c
@@ -611,6 +611,8 @@ static struct tegra_dc_shift_clk_div tegra_dsi_get_shift_clk_div(
611 * holds the real value of shift_clk_div. 611 * holds the real value of shift_clk_div.
612 */ 612 */
613 shift_clk_div = dsi->default_shift_clk_div; 613 shift_clk_div = dsi->default_shift_clk_div;
614 if (WARN(!shift_clk_div.div, "shift_clk_div.div is 0\n"))
615 return shift_clk_div;
614 616
615 /* Calculate shift_clk_div which can match the video_burst_mode. */ 617 /* Calculate shift_clk_div which can match the video_burst_mode. */
616 if (dsi->info.video_burst_mode >= 618 if (dsi->info.video_burst_mode >=