summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/pmgr/pwrpolicy.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/nvgpu/pmgr/pwrpolicy.c')
-rw-r--r--drivers/gpu/nvgpu/pmgr/pwrpolicy.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/drivers/gpu/nvgpu/pmgr/pwrpolicy.c b/drivers/gpu/nvgpu/pmgr/pwrpolicy.c
index d7926773..cce3bd5e 100644
--- a/drivers/gpu/nvgpu/pmgr/pwrpolicy.c
+++ b/drivers/gpu/nvgpu/pmgr/pwrpolicy.c
@@ -466,13 +466,14 @@ static u32 devinit_get_pwr_policy_table(struct gk20a *g,
466 466
467 gk20a_dbg_info(""); 467 gk20a_dbg_info("");
468 468
469 if (g->ops.bios.get_perf_table_ptrs != NULL) { 469 if (!g->ops.bios.get_perf_table_ptrs)
470 pwr_policy_table_ptr = (u8 *)g->ops.bios.get_perf_table_ptrs(g, 470 return -EINVAL;
471 g->bios.perf_token, POWER_CAPPING_TABLE); 471
472 if (pwr_policy_table_ptr == NULL) { 472 pwr_policy_table_ptr = (u8 *)g->ops.bios.get_perf_table_ptrs(g,
473 status = -EINVAL; 473 g->bios.perf_token, POWER_CAPPING_TABLE);
474 goto done; 474 if (pwr_policy_table_ptr == NULL) {
475 } 475 status = -EINVAL;
476 goto done;
476 } 477 }
477 478
478 memcpy(&pwr_policy_table_header.version, 479 memcpy(&pwr_policy_table_header.version,