diff options
author | Alex Van Brunt <avanbrunt@nvidia.com> | 2015-05-11 12:52:09 -0400 |
---|---|---|
committer | Alexander Van Brunt <avanbrunt@nvidia.com> | 2015-05-15 18:42:41 -0400 |
commit | 900f63393d80cc1978c5758a368cf1edb3d267ae (patch) | |
tree | 644a95e6d51ee375e46156c190b620aed9789009 /drivers/gpu | |
parent | aa25a952ea2b19a081fa746f043228c270f43f94 (diff) |
gpu: nvgpu: don't reset clk that doesn't exist
If the clock is null, calling the reset function will crash the
kernel. So, don't call the reset function.
Change-Id: I37ef25c8dca67bec8bf6654eb6e275b866bdae53
Signed-off-by: Alex Van Brunt <avanbrunt@nvidia.com>
Reviewed-on: http://git-master/r/742361
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/gk20a.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/gk20a.c b/drivers/gpu/nvgpu/gk20a/gk20a.c index f6c9f901..eb6774da 100644 --- a/drivers/gpu/nvgpu/gk20a/gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/gk20a.c | |||
@@ -1311,10 +1311,12 @@ static int gk20a_secure_page_alloc(struct platform_device *pdev) | |||
1311 | int err = 0; | 1311 | int err = 0; |
1312 | 1312 | ||
1313 | if (platform->secure_page_alloc) { | 1313 | if (platform->secure_page_alloc) { |
1314 | tegra_periph_reset_assert(platform->clk[0]); | 1314 | if (platform->num_clks > 0) |
1315 | tegra_periph_reset_assert(platform->clk[0]); | ||
1315 | udelay(10); | 1316 | udelay(10); |
1316 | err = platform->secure_page_alloc(pdev); | 1317 | err = platform->secure_page_alloc(pdev); |
1317 | tegra_periph_reset_deassert(platform->clk[0]); | 1318 | if (platform->num_clks > 0) |
1319 | tegra_periph_reset_deassert(platform->clk[0]); | ||
1318 | } | 1320 | } |
1319 | 1321 | ||
1320 | if (!err) | 1322 | if (!err) |