summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gv11b/hal_gv11b.c
diff options
context:
space:
mode:
authorPhilip Elcan <pelcan@nvidia.com>2018-09-18 10:28:15 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2018-09-26 19:45:03 -0400
commit186e0291ab827c26674a8216f71dc3c7353b1e00 (patch)
tree4dc504943bc3405269e1ed74642d7a53abefbb4e /drivers/gpu/nvgpu/gv11b/hal_gv11b.c
parent07e5bd817a23913d120b945ced5c96951716886c (diff)
gpu: nvgpu: commonize errs in *get_litter_value()
No one is checking return values for the *get_litter_value() functions in the 100s of references, and some of the *get_litter_value() functions were already doing a BUG(), we'll just call BUG() in all them. And since we don't return in the error case, and there's no guarantee that an errno won't collide with the litter values, we'll just initialize the local ret value to 0 to avoid problems and confusion. JIRA NVGPU-647 Change-Id: Id974c904a142c4b3abf1ab940121c270208b0b83 Signed-off-by: Philip Elcan <pelcan@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1830582 GVS: Gerrit_Virtual_Submit Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Scott Long <scottl@nvidia.com> Reviewed-by: Alex Waterman <alexw@nvidia.com> Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gv11b/hal_gv11b.c')
-rw-r--r--drivers/gpu/nvgpu/gv11b/hal_gv11b.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/nvgpu/gv11b/hal_gv11b.c b/drivers/gpu/nvgpu/gv11b/hal_gv11b.c
index 0ee0e6c8..a79071b7 100644
--- a/drivers/gpu/nvgpu/gv11b/hal_gv11b.c
+++ b/drivers/gpu/nvgpu/gv11b/hal_gv11b.c
@@ -106,7 +106,7 @@
106 106
107u32 gv11b_get_litter_value(struct gk20a *g, int value) 107u32 gv11b_get_litter_value(struct gk20a *g, int value)
108{ 108{
109 u32 ret = EINVAL; 109 u32 ret = 0;
110 switch (value) { 110 switch (value) {
111 case GPU_LIT_NUM_GPCS: 111 case GPU_LIT_NUM_GPCS:
112 ret = proj_scal_litter_num_gpcs_v(); 112 ret = proj_scal_litter_num_gpcs_v();