diff options
author | Deepak Nibade <dnibade@nvidia.com> | 2017-12-27 05:07:28 -0500 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2018-01-04 11:45:27 -0500 |
commit | 292e4a0c6dc8ba2066c41e9215e731861ea2dbef (patch) | |
tree | f5a72ca499adb19255eb964e2e0a423bc83accf1 /drivers/gpu/nvgpu/common/linux | |
parent | e21e253f8372d8f2589a19f1df4e180ef6f57d1d (diff) |
gpu: nvgpu: return error if TSG allocation fails
In gk20a_cde_load(), if TSG allocation fails we bail out the function without
setting the error code and caller of this functions assumes CDE load is
successful
Fix this by setting explicit error code if TSG allocation fails
Bug 200374011
Change-Id: I6e7bcb325fb0062605fa2f696da4abdeb34e241a
Signed-off-by: Deepak Nibade <dnibade@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1627117
GVS: Gerrit_Virtual_Submit
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/common/linux')
-rw-r--r-- | drivers/gpu/nvgpu/common/linux/cde.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/common/linux/cde.c b/drivers/gpu/nvgpu/common/linux/cde.c index 5f0dfb0b..040a4e3d 100644 --- a/drivers/gpu/nvgpu/common/linux/cde.c +++ b/drivers/gpu/nvgpu/common/linux/cde.c | |||
@@ -1284,6 +1284,7 @@ static int gk20a_cde_load(struct gk20a_cde_ctx *cde_ctx) | |||
1284 | tsg = gk20a_tsg_open(g); | 1284 | tsg = gk20a_tsg_open(g); |
1285 | if (!tsg) { | 1285 | if (!tsg) { |
1286 | nvgpu_err(g, "cde: could not create TSG"); | 1286 | nvgpu_err(g, "cde: could not create TSG"); |
1287 | err = -ENOMEM; | ||
1287 | goto err_get_gk20a_channel; | 1288 | goto err_get_gk20a_channel; |
1288 | } | 1289 | } |
1289 | 1290 | ||