summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gk20a/channel_gk20a.c
diff options
context:
space:
mode:
authorTerje Bergstrom <tbergstrom@nvidia.com>2015-02-11 13:13:05 -0500
committerDan Willemsen <dwillemsen@nvidia.com>2015-04-04 21:07:35 -0400
commit9bf82585aa24b6052855c119855abef92671d502 (patch)
treeb342047d4ddb99c265263bcf5c06a97d1df2389e /drivers/gpu/nvgpu/gk20a/channel_gk20a.c
parent51b299c7dded7841ee83a6ca2bf1b6396db34920 (diff)
gpu: nvgpu: Install fd after no errors can happen
fd_install() should be called only once all other initialization is done and no errors can happen. Bug 1589104 Change-Id: I822511a64d4c6fa59c8e772a896dbd6818459c97 Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com> Reviewed-on: http://git-master/r/706928 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Seshendra Gadagottu <sgadagottu@nvidia.com> Reviewed-by: Deepak Nibade <dnibade@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/channel_gk20a.c')
-rw-r--r--drivers/gpu/nvgpu/gk20a/channel_gk20a.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/channel_gk20a.c b/drivers/gpu/nvgpu/gk20a/channel_gk20a.c
index 4e68fe67..ddd3468c 100644
--- a/drivers/gpu/nvgpu/gk20a/channel_gk20a.c
+++ b/drivers/gpu/nvgpu/gk20a/channel_gk20a.c
@@ -837,12 +837,12 @@ int gk20a_channel_open_ioctl(struct gk20a *g,
837 err = PTR_ERR(file); 837 err = PTR_ERR(file);
838 goto clean_up; 838 goto clean_up;
839 } 839 }
840 fd_install(fd, file);
841 840
842 err = __gk20a_channel_open(g, file); 841 err = __gk20a_channel_open(g, file);
843 if (err) 842 if (err)
844 goto clean_up_file; 843 goto clean_up_file;
845 844
845 fd_install(fd, file);
846 args->channel_fd = fd; 846 args->channel_fd = fd;
847 return 0; 847 return 0;
848 848