diff options
Diffstat (limited to 'drivers/gpu/nvgpu/clk')
-rw-r--r-- | drivers/gpu/nvgpu/clk/clk_prog.c | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/drivers/gpu/nvgpu/clk/clk_prog.c b/drivers/gpu/nvgpu/clk/clk_prog.c index 22add3b0..d4876da8 100644 --- a/drivers/gpu/nvgpu/clk/clk_prog.c +++ b/drivers/gpu/nvgpu/clk/clk_prog.c | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) 2017, NVIDIA CORPORATION. All rights reserved. | 2 | * Copyright (c) 2016-2017, NVIDIA CORPORATION. All rights reserved. |
3 | * | 3 | * |
4 | * This program is free software; you can redistribute it and/or modify it | 4 | * This program is free software; you can redistribute it and/or modify it |
5 | * under the terms and conditions of the GNU General Public License, | 5 | * under the terms and conditions of the GNU General Public License, |
@@ -182,13 +182,16 @@ static u32 devinit_get_clk_prog_table(struct gk20a *g, | |||
182 | 182 | ||
183 | gk20a_dbg_info(""); | 183 | gk20a_dbg_info(""); |
184 | 184 | ||
185 | if (g->ops.bios.get_perf_table_ptrs) { | 185 | if (!g->ops.bios.get_perf_table_ptrs) { |
186 | clkprogs_tbl_ptr = (u8 *)g->ops.bios.get_perf_table_ptrs(g, | 186 | status = -EINVAL; |
187 | g->bios.clock_token, CLOCK_PROGRAMMING_TABLE); | 187 | goto done; |
188 | if (clkprogs_tbl_ptr == NULL) { | 188 | } |
189 | status = -EINVAL; | 189 | |
190 | goto done; | 190 | clkprogs_tbl_ptr = (u8 *)g->ops.bios.get_perf_table_ptrs(g, |
191 | } | 191 | g->bios.clock_token, CLOCK_PROGRAMMING_TABLE); |
192 | if (clkprogs_tbl_ptr == NULL) { | ||
193 | status = -EINVAL; | ||
194 | goto done; | ||
192 | } | 195 | } |
193 | 196 | ||
194 | memcpy(&header, clkprogs_tbl_ptr, hszfmt); | 197 | memcpy(&header, clkprogs_tbl_ptr, hszfmt); |