From 292e4a0c6dc8ba2066c41e9215e731861ea2dbef Mon Sep 17 00:00:00 2001 From: Deepak Nibade Date: Wed, 27 Dec 2017 02:07:28 -0800 Subject: 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 Reviewed-on: https://git-master.nvidia.com/r/1627117 GVS: Gerrit_Virtual_Submit Reviewed-by: Terje Bergstrom Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/common/linux/cde.c | 1 + 1 file changed, 1 insertion(+) (limited to 'drivers/gpu/nvgpu/common/linux/cde.c') 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) tsg = gk20a_tsg_open(g); if (!tsg) { nvgpu_err(g, "cde: could not create TSG"); + err = -ENOMEM; goto err_get_gk20a_channel; } -- cgit v1.2.2