--- a/drivers/gpu/drm/nouveau/nouveau_fence.c~ 2014-03-30 20:40:15.000000000 -0700 +++ b/drivers/gpu/drm/nouveau/nouveau_fence.c 2014-05-14 13:39:02.115359923 -0700 @@ -178,11 +178,17 @@ { struct nouveau_channel *chan = fence->channel; - struct nouveau_fifo *pfifo = nouveau_fifo(chan->drm->device); - struct nouveau_fence_priv *priv = chan->drm->fence; + struct nouveau_fifo *pfifo; + struct nouveau_fence_priv *priv; struct nouveau_eventh *handler; int ret = 0; + if (WARN_ON_ONCE(!chan)) + return 0; + + pfifo = nouveau_fifo(chan->drm->device); + priv = chan->drm->fence; + ret = nouveau_event_new(pfifo->uevent, 0, nouveau_fence_wait_uevent_handler, priv, &handler);