diff options
author | Konsta Holtta <kholtta@nvidia.com> | 2014-09-26 09:05:41 -0400 |
---|---|---|
committer | Dan Willemsen <dwillemsen@nvidia.com> | 2015-03-18 15:11:34 -0400 |
commit | 2d0bcfa3318c276dba5100510e59c5c2fa62957f (patch) | |
tree | 8651c32920cddc94cf046c76e7ea6676d6e688e8 /drivers/gpu/nvgpu/gk20a/dbg_gpu_gk20a.c | |
parent | 79ab01debd382b91aecb474fc3cb51de78e2f1a7 (diff) |
gpu: nvgpu: add __must_check to gk20a_busy
The return value of gk20a_busy must be checked since it may not succeed
in some cases. Add the __must_check attribute that generates a compiler
warning for code that does not read the return value and fix all uses of
the function to take error cases into account.
Bug 200040921
Change-Id: Ibc2b119985fa230324c88026fe94fc5f1894fe4f
Signed-off-by: Konsta Holtta <kholtta@nvidia.com>
Reviewed-on: http://git-master/r/542552
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Tested-by: Terje Bergstrom <tbergstrom@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/dbg_gpu_gk20a.c')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/dbg_gpu_gk20a.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/dbg_gpu_gk20a.c b/drivers/gpu/nvgpu/gk20a/dbg_gpu_gk20a.c index 40751b88..6af54e68 100644 --- a/drivers/gpu/nvgpu/gk20a/dbg_gpu_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/dbg_gpu_gk20a.c | |||
@@ -571,7 +571,10 @@ static int dbg_set_powergate(struct dbg_session_gk20a *dbg_s, | |||
571 | (g->dbg_powergating_disabled_refcount++ == 0)) { | 571 | (g->dbg_powergating_disabled_refcount++ == 0)) { |
572 | 572 | ||
573 | gk20a_dbg(gpu_dbg_gpu_dbg | gpu_dbg_fn, "module busy"); | 573 | gk20a_dbg(gpu_dbg_gpu_dbg | gpu_dbg_fn, "module busy"); |
574 | gk20a_busy(g->dev); | 574 | err = gk20a_busy(g->dev); |
575 | if (err) | ||
576 | return err; | ||
577 | |||
575 | err = gk20a_busy(dbg_s->pdev); | 578 | err = gk20a_busy(dbg_s->pdev); |
576 | if (err) | 579 | if (err) |
577 | return -EPERM; | 580 | return -EPERM; |