diff options
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/channel_gk20a.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/channel_gk20a.c b/drivers/gpu/nvgpu/gk20a/channel_gk20a.c index 669ec294..c174afcd 100644 --- a/drivers/gpu/nvgpu/gk20a/channel_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/channel_gk20a.c | |||
@@ -708,9 +708,12 @@ unbind: | |||
708 | int gk20a_channel_release(struct inode *inode, struct file *filp) | 708 | int gk20a_channel_release(struct inode *inode, struct file *filp) |
709 | { | 709 | { |
710 | struct channel_gk20a *ch = (struct channel_gk20a *)filp->private_data; | 710 | struct channel_gk20a *ch = (struct channel_gk20a *)filp->private_data; |
711 | struct gk20a *g = ch->g; | 711 | struct gk20a *g = ch ? ch->g : NULL; |
712 | int err; | 712 | int err; |
713 | 713 | ||
714 | if (!ch) | ||
715 | return 0; | ||
716 | |||
714 | trace_gk20a_channel_release(dev_name(&g->dev->dev)); | 717 | trace_gk20a_channel_release(dev_name(&g->dev->dev)); |
715 | 718 | ||
716 | err = gk20a_busy(ch->g->dev); | 719 | err = gk20a_busy(ch->g->dev); |