diff options
Diffstat (limited to 'drivers/gpu/nvgpu/perf/vfe_var.c')
-rw-r--r-- | drivers/gpu/nvgpu/perf/vfe_var.c | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/drivers/gpu/nvgpu/perf/vfe_var.c b/drivers/gpu/nvgpu/perf/vfe_var.c index f43e68e2..65ede64a 100644 --- a/drivers/gpu/nvgpu/perf/vfe_var.c +++ b/drivers/gpu/nvgpu/perf/vfe_var.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, |
@@ -868,14 +868,17 @@ static u32 devinit_get_vfe_var_table(struct gk20a *g, | |||
868 | 868 | ||
869 | gk20a_dbg_info(""); | 869 | gk20a_dbg_info(""); |
870 | 870 | ||
871 | if (g->ops.bios.get_perf_table_ptrs) { | 871 | if (!g->ops.bios.get_perf_table_ptrs) { |
872 | vfevars_tbl_ptr = (u8 *)g->ops.bios.get_perf_table_ptrs(g, | 872 | status = -EINVAL; |
873 | g->bios.perf_token, | 873 | goto done; |
874 | CONTINUOUS_VIRTUAL_BINNING_TABLE); | 874 | } |
875 | if (vfevars_tbl_ptr == NULL) { | 875 | |
876 | status = -EINVAL; | 876 | vfevars_tbl_ptr = (u8 *)g->ops.bios.get_perf_table_ptrs(g, |
877 | goto done; | 877 | g->bios.perf_token, |
878 | } | 878 | CONTINUOUS_VIRTUAL_BINNING_TABLE); |
879 | if (vfevars_tbl_ptr == NULL) { | ||
880 | status = -EINVAL; | ||
881 | goto done; | ||
879 | } | 882 | } |
880 | 883 | ||
881 | memcpy(&vfevars_tbl_header, vfevars_tbl_ptr, | 884 | memcpy(&vfevars_tbl_header, vfevars_tbl_ptr, |