From 16bf1e941699c70240d87143e6ee923e32c7b4a0 Mon Sep 17 00:00:00 2001 From: Seema Khowala Date: Thu, 12 Jan 2017 09:52:28 -0800 Subject: gpu: nvgpu: Add null check for g->host1x_dev gk20a_tegra_dump_debug() is set in a platform where host1x support is not enabled. Change-Id: Ic57f9081d75be976a092827b253cb2a195d8f16d Signed-off-by: Seema Khowala Reviewed-on: http://git-master/r/1284336 Reviewed-by: Konsta Holtta Reviewed-by: svccoveritychecker GVS: Gerrit_Virtual_Submit Reviewed-by: Terje Bergstrom --- drivers/gpu/nvgpu/gk20a/platform_gk20a_tegra.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'drivers') diff --git a/drivers/gpu/nvgpu/gk20a/platform_gk20a_tegra.c b/drivers/gpu/nvgpu/gk20a/platform_gk20a_tegra.c index f61b14fa..87c678ea 100644 --- a/drivers/gpu/nvgpu/gk20a/platform_gk20a_tegra.c +++ b/drivers/gpu/nvgpu/gk20a/platform_gk20a_tegra.c @@ -1,7 +1,7 @@ /* * GK20A Tegra Platform Interface * - * Copyright (c) 2014-2016, NVIDIA CORPORATION. All rights reserved. + * Copyright (c) 2014-2017, NVIDIA CORPORATION. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License, @@ -766,7 +766,9 @@ void gk20a_tegra_debug_dump(struct device *dev) { struct gk20a_platform *platform = gk20a_get_platform(dev); struct gk20a *g = platform->g; - nvhost_debug_dump_device(g->host1x_dev); + + if (g->host1x_dev) + nvhost_debug_dump_device(g->host1x_dev); } int gk20a_tegra_busy(struct device *dev) -- cgit v1.2.2