summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gk20a/tsg_gk20a.c
diff options
context:
space:
mode:
authorDeepak Nibade <dnibade@nvidia.com>2016-06-27 03:20:39 -0400
committerTerje Bergstrom <tbergstrom@nvidia.com>2016-06-27 12:06:42 -0400
commita445a678bcf480bde01ab784ab050096fd5725eb (patch)
tree299824b1d228e7fe1b6928732cd258b2239c1ce0 /drivers/gpu/nvgpu/gk20a/tsg_gk20a.c
parente5435f0eaf1de94caaf7e018166182b35a389963 (diff)
gpu: nvgpu: remove unused code
In gk20a_tsg_bind_channel_fd(), API gk20a_get_channel_from_file() already handles converting a channel fd to channel Hence explicit fget(ch_fd) is not required and is unused Coverity id : 32386 Bug 200192125 Change-Id: I28674cebf088240b8b15129a22f6743c856ed88f Signed-off-by: Deepak Nibade <dnibade@nvidia.com> Reviewed-on: http://git-master/r/1171713 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/tsg_gk20a.c')
-rw-r--r--drivers/gpu/nvgpu/gk20a/tsg_gk20a.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/tsg_gk20a.c b/drivers/gpu/nvgpu/gk20a/tsg_gk20a.c
index 603ed6f5..0fa93da9 100644
--- a/drivers/gpu/nvgpu/gk20a/tsg_gk20a.c
+++ b/drivers/gpu/nvgpu/gk20a/tsg_gk20a.c
@@ -80,15 +80,14 @@ static bool gk20a_is_channel_active(struct gk20a *g, struct channel_gk20a *ch)
80 80
81static int gk20a_tsg_bind_channel_fd(struct tsg_gk20a *tsg, int ch_fd) 81static int gk20a_tsg_bind_channel_fd(struct tsg_gk20a *tsg, int ch_fd)
82{ 82{
83 struct file *f = fget(ch_fd);
84 struct channel_gk20a *ch; 83 struct channel_gk20a *ch;
85 int err; 84 int err;
86 85
87 ch = gk20a_get_channel_from_file(ch_fd); 86 ch = gk20a_get_channel_from_file(ch_fd);
88 if (!ch) 87 if (!ch)
89 return -EINVAL; 88 return -EINVAL;
89
90 err = ch->g->ops.fifo.tsg_bind_channel(tsg, ch); 90 err = ch->g->ops.fifo.tsg_bind_channel(tsg, ch);
91 fput(f);
92 return err; 91 return err;
93} 92}
94 93