summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/therm
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/nvgpu/therm')
-rw-r--r--drivers/gpu/nvgpu/therm/thrmchannel.c15
-rw-r--r--drivers/gpu/nvgpu/therm/thrmdev.c15
2 files changed, 16 insertions, 14 deletions
diff --git a/drivers/gpu/nvgpu/therm/thrmchannel.c b/drivers/gpu/nvgpu/therm/thrmchannel.c
index b5a7dfd2..aa40dac8 100644
--- a/drivers/gpu/nvgpu/therm/thrmchannel.c
+++ b/drivers/gpu/nvgpu/therm/thrmchannel.c
@@ -131,13 +131,14 @@ static u32 devinit_get_therm_channel_table(struct gk20a *g,
131 131
132 gk20a_dbg_info(""); 132 gk20a_dbg_info("");
133 133
134 if (g->ops.bios.get_perf_table_ptrs) { 134 if (!g->ops.bios.get_perf_table_ptrs)
135 therm_channel_table_ptr = (u8 *)g->ops.bios.get_perf_table_ptrs(g, 135 return -EINVAL;
136 g->bios.perf_token, THERMAL_CHANNEL_TABLE); 136
137 if (therm_channel_table_ptr == NULL) { 137 therm_channel_table_ptr = (u8 *)g->ops.bios.get_perf_table_ptrs(g,
138 status = -EINVAL; 138 g->bios.perf_token, THERMAL_CHANNEL_TABLE);
139 goto done; 139 if (therm_channel_table_ptr == NULL) {
140 } 140 status = -EINVAL;
141 goto done;
141 } 142 }
142 143
143 memcpy(&therm_channel_table_header, therm_channel_table_ptr, 144 memcpy(&therm_channel_table_header, therm_channel_table_ptr,
diff --git a/drivers/gpu/nvgpu/therm/thrmdev.c b/drivers/gpu/nvgpu/therm/thrmdev.c
index 83ac9739..9bb77537 100644
--- a/drivers/gpu/nvgpu/therm/thrmdev.c
+++ b/drivers/gpu/nvgpu/therm/thrmdev.c
@@ -81,13 +81,14 @@ static u32 devinit_get_therm_device_table(struct gk20a *g,
81 81
82 gk20a_dbg_info(""); 82 gk20a_dbg_info("");
83 83
84 if (g->ops.bios.get_perf_table_ptrs) { 84 if (!g->ops.bios.get_perf_table_ptrs)
85 therm_device_table_ptr = (u8 *)g->ops.bios.get_perf_table_ptrs(g, 85 return -EINVAL;
86 g->bios.perf_token, THERMAL_DEVICE_TABLE); 86
87 if (therm_device_table_ptr == NULL) { 87 therm_device_table_ptr = (u8 *)g->ops.bios.get_perf_table_ptrs(g,
88 status = -EINVAL; 88 g->bios.perf_token, THERMAL_DEVICE_TABLE);
89 goto done; 89 if (therm_device_table_ptr == NULL) {
90 } 90 status = -EINVAL;
91 goto done;
91 } 92 }
92 93
93 memcpy(&therm_device_table_header, therm_device_table_ptr, 94 memcpy(&therm_device_table_header, therm_device_table_ptr,