gpu: nvgpu: print error code when sync_fence construction failed

print the correct error code when the sync_fence construction fails
instead of just an error message.

Bug 200421587

Change-Id: I9d6f9df8bec0e43d0a1198fbe7ab2631f12f572a
Signed-off-by: Debarshi Dutta <ddutta@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1809642
Reviewed-by: svc-misra-checker <svc-misra-checker@nvidia.com>
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Vijayakumar Subbu <vsubbu@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
Debarshi Dutta
2018-08-30 10:29:08 +05:30
committed by mobile promotions
parent b0070a58cc
commit f125d1b681

View File

@@ -99,7 +99,7 @@ int nvgpu_os_fence_syncpt_create(
nvhost_dev, id, thresh, "fence");
if (IS_ERR(fence)) {
nvgpu_err(c->g, "error constructing fence %s", "fence");
nvgpu_err(c->g, "error %d during construction of fence.", (int)PTR_ERR(fence));
return PTR_ERR(fence);
}