Skip to content

Commit

Permalink
drm/nouveau: fix crash with noaccel=1
Browse files Browse the repository at this point in the history
Reported-by: Ortwin Glück <odi@odi.ch>
Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
  • Loading branch information
Marcin Slusarz authored and Ben Skeggs committed Nov 18, 2012
1 parent 1f150b3 commit bf7e438
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions drivers/gpu/drm/nouveau/nouveau_abi16.c
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,10 @@ nouveau_abi16_ioctl_channel_alloc(ABI16_IOCTL_ARGS)

if (unlikely(!abi16))
return -ENOMEM;

if (!drm->channel)
return nouveau_abi16_put(abi16, -ENODEV);

client = nv_client(abi16->client);

if (init->fb_ctxdma_handle == ~0 || init->tt_ctxdma_handle == ~0)
Expand Down

0 comments on commit bf7e438

Please sign in to comment.