diff options
-rw-r--r-- | drivers/gpu/drm/nouveau/nouveau_ramht.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_ramht.c b/drivers/gpu/drm/nouveau/nouveau_ramht.c index de34b6bb059f..f240ba241943 100644 --- a/drivers/gpu/drm/nouveau/nouveau_ramht.c +++ b/drivers/gpu/drm/nouveau/nouveau_ramht.c @@ -197,6 +197,9 @@ nouveau_ramht_find(struct nouveau_channel *chan, u32 handle) struct nouveau_gpuobj *gpuobj = NULL; unsigned long flags; + if (unlikely(!chan->ramht)) + return NULL; + spin_lock_irqsave(&ramht->lock, flags); list_for_each_entry(entry, &chan->ramht->entries, head) { if (entry->channel == chan && entry->handle == handle) { |