summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/therm/thrmdev.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/nvgpu/therm/thrmdev.c')
-rw-r--r--drivers/gpu/nvgpu/therm/thrmdev.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/gpu/nvgpu/therm/thrmdev.c b/drivers/gpu/nvgpu/therm/thrmdev.c
index ddd1f280..b0e65af7 100644
--- a/drivers/gpu/nvgpu/therm/thrmdev.c
+++ b/drivers/gpu/nvgpu/therm/thrmdev.c
@@ -43,8 +43,9 @@ static int _therm_device_pmudata_instget(struct gk20a *g,
43 43
44 /*check whether pmuboardobjgrp has a valid boardobj in index*/ 44 /*check whether pmuboardobjgrp has a valid boardobj in index*/
45 if (((u32)BIT(idx) & 45 if (((u32)BIT(idx) &
46 pgrp_set->hdr.data.super.obj_mask.super.data[0]) == 0) 46 pgrp_set->hdr.data.super.obj_mask.super.data[0]) == 0) {
47 return -EINVAL; 47 return -EINVAL;
48 }
48 49
49 *ppboardobjpmudata = (struct nv_pmu_boardobj *) 50 *ppboardobjpmudata = (struct nv_pmu_boardobj *)
50 &pgrp_set->objects[idx].data; 51 &pgrp_set->objects[idx].data;
@@ -208,8 +209,9 @@ static struct boardobj *therm_device_construct(struct gk20a *g,
208 board_obj_ptr = NULL; 209 board_obj_ptr = NULL;
209 nvgpu_err(g, 210 nvgpu_err(g,
210 "could not allocate memory for therm_device"); 211 "could not allocate memory for therm_device");
211 if (board_obj_ptr != NULL) 212 if (board_obj_ptr != NULL) {
212 nvgpu_kfree(g, board_obj_ptr); 213 nvgpu_kfree(g, board_obj_ptr);
214 }
213 } 215 }
214 216
215 217
@@ -347,8 +349,9 @@ int therm_device_sw_setup(struct gk20a *g)
347 pboardobjgrp->pmudatainstget = _therm_device_pmudata_instget; 349 pboardobjgrp->pmudatainstget = _therm_device_pmudata_instget;
348 350
349 status = devinit_get_therm_device_table(g, pthermdeviceobjs); 351 status = devinit_get_therm_device_table(g, pthermdeviceobjs);
350 if (status) 352 if (status) {
351 goto done; 353 goto done;
354 }
352 355
353 BOARDOBJGRP_PMU_CONSTRUCT(pboardobjgrp, THERM, THERM_DEVICE); 356 BOARDOBJGRP_PMU_CONSTRUCT(pboardobjgrp, THERM, THERM_DEVICE);
354 357