summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorAchal Verma <achalv@nvidia.com>2021-05-12 03:26:30 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2021-08-13 16:11:03 -0400
commit6ccef15c0db666fe23d70dcd8d227fc43cc80fc5 (patch)
treedaf1da5518dd34ce0ffc32e0a444c90a7b3b2623 /drivers
parent22418a46a5076dd13268c85620b403397d3d0878 (diff)
tegra-dc: Check ptr against NULL before access.
This fix coverity issue: 2907007 Bug 200741055 Change-Id: Ib79759e5b2dc83bdf77e659a30a0d9f891e2a899 Signed-off-by: Achal Verma <achalv@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2528297 Reviewed-by: svcacv <svcacv@nvidia.com> Reviewed-by: Dmitry Pervushin <dpervushin@nvidia.com> Reviewed-by: Rahul Jain (SW-TEGRA) <rahuljain@nvidia.com> GVS: Gerrit_Virtual_Submit Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2575322 Tested-by: mobile promotions <svcmobile_promotions@nvidia.com> Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com> Reviewed-by: Phoenix Jung <pjung@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/video/tegra/dc/of_dc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/video/tegra/dc/of_dc.c b/drivers/video/tegra/dc/of_dc.c
index a90538156..de8acdc02 100644
--- a/drivers/video/tegra/dc/of_dc.c
+++ b/drivers/video/tegra/dc/of_dc.c
@@ -1,7 +1,7 @@
1/* 1/*
2 * of_dc.c: tegra dc of interface. 2 * of_dc.c: tegra dc of interface.
3 * 3 *
4 * Copyright (c) 2013-2019, NVIDIA CORPORATION. All rights reserved. 4 * Copyright (c) 2013-2021, NVIDIA CORPORATION. All rights reserved.
5 * 5 *
6 * This program is free software; you can redistribute it and/or modify it 6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms and conditions of the GNU General Public License, 7 * under the terms and conditions of the GNU General Public License,
@@ -2865,7 +2865,7 @@ struct tegra_dc_platform_data *of_dc_parse_platform_data(
2865 case TEGRA_DC_OUT_FAKE_DP: 2865 case TEGRA_DC_OUT_FAKE_DP:
2866 case TEGRA_DC_OUT_HDMI: 2866 case TEGRA_DC_OUT_HDMI:
2867 case TEGRA_DC_OUT_DP: 2867 case TEGRA_DC_OUT_DP:
2868 if (dc->current_topology.conn_inst == 0) { 2868 if (dc && dc->current_topology.conn_inst == 0) {
2869 pdata->conn_np = 2869 pdata->conn_np =
2870 of_find_node_by_path("/host1x/sor"); 2870 of_find_node_by_path("/host1x/sor");
2871 } else { 2871 } else {