gpu: nvgpu: Enable clocks only if defined

Enable clocks only if they are defined. This prevents panic in cases
where clock does not need to be enabled explicitly.

Bug 1567274

Change-Id: I7113c6d874b61acc2646effda9c02d3d1817c531
Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com>
This commit is contained in:
Terje Bergstrom
2014-10-24 14:49:06 +03:00
committed by Dan Willemsen
parent be48f4a451
commit b5bb4f53db
2 changed files with 11 additions and 3 deletions

View File

@@ -96,6 +96,10 @@ err_get_clock:
clk_put(platform->clk[1]);
if (!IS_ERR_OR_NULL(platform->clk[2]))
clk_put(platform->clk[2]);
platform->clk[0] = NULL;
platform->clk[1] = NULL;
platform->clk[2] = NULL;
return -ENODEV;
}