diff options
Diffstat (limited to 'drivers/gpu/nvgpu/pmgr/pwrdev.c')
-rw-r--r-- | drivers/gpu/nvgpu/pmgr/pwrdev.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/drivers/gpu/nvgpu/pmgr/pwrdev.c b/drivers/gpu/nvgpu/pmgr/pwrdev.c index 03e2eb34..da034b31 100644 --- a/drivers/gpu/nvgpu/pmgr/pwrdev.c +++ b/drivers/gpu/nvgpu/pmgr/pwrdev.c | |||
@@ -140,13 +140,14 @@ static u32 devinit_get_pwr_device_table(struct gk20a *g, | |||
140 | 140 | ||
141 | gk20a_dbg_info(""); | 141 | gk20a_dbg_info(""); |
142 | 142 | ||
143 | if (g->ops.bios.get_perf_table_ptrs != NULL) { | 143 | if (!g->ops.bios.get_perf_table_ptrs) |
144 | pwr_device_table_ptr = (u8 *)g->ops.bios.get_perf_table_ptrs(g, | 144 | return -EINVAL; |
145 | g->bios.perf_token, POWER_SENSORS_TABLE); | 145 | |
146 | if (pwr_device_table_ptr == NULL) { | 146 | pwr_device_table_ptr = (u8 *)g->ops.bios.get_perf_table_ptrs(g, |
147 | status = -EINVAL; | 147 | g->bios.perf_token, POWER_SENSORS_TABLE); |
148 | goto done; | 148 | if (pwr_device_table_ptr == NULL) { |
149 | } | 149 | status = -EINVAL; |
150 | goto done; | ||
150 | } | 151 | } |
151 | 152 | ||
152 | memcpy(&pwr_sensor_table_header, pwr_device_table_ptr, | 153 | memcpy(&pwr_sensor_table_header, pwr_device_table_ptr, |