mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-25 02:52:51 +03:00
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>
This commit is contained in:
committed by
Dan Willemsen
parent
79ab01debd
commit
2d0bcfa331
@@ -82,8 +82,12 @@ int gk20a_as_release_share(struct gk20a_as_share *as_share)
|
||||
if (atomic_dec_return(&as_share->ref_cnt) > 0)
|
||||
return 0;
|
||||
|
||||
gk20a_busy(g->dev);
|
||||
err = gk20a_busy(g->dev);
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
err = gk20a_vm_release_share(as_share);
|
||||
|
||||
gk20a_idle(g->dev);
|
||||
|
||||
release_as_share_id(as_share->as, as_share->id);
|
||||
|
||||
Reference in New Issue
Block a user