Skip to content

Commit

Permalink
drm/nouveau: fixup the init failure paths some more
Browse files Browse the repository at this point in the history
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
  • Loading branch information
Ben Skeggs committed Apr 9, 2010
1 parent 494ab82 commit 78bb351
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion drivers/gpu/drm/nouveau/nouveau_state.c
Original file line number Diff line number Diff line change
Expand Up @@ -505,7 +505,7 @@ nouveau_card_init(struct drm_device *dev)
else
ret = nv04_display_create(dev);
if (ret)
goto out_irq;
goto out_channel;
}

ret = nouveau_backlight_init(dev);
Expand All @@ -519,6 +519,11 @@ nouveau_card_init(struct drm_device *dev)

return 0;

out_channel:
if (dev_priv->channel) {
nouveau_channel_free(dev_priv->channel);
dev_priv->channel = NULL;
}
out_irq:
drm_irq_uninstall(dev);
out_fifo:
Expand All @@ -536,6 +541,7 @@ nouveau_card_init(struct drm_device *dev)
out_gpuobj:
nouveau_gpuobj_takedown(dev);
out_mem:
nouveau_sgdma_takedown(dev);
nouveau_mem_close(dev);
out_instmem:
engine->instmem.takedown(dev);
Expand Down

0 comments on commit 78bb351

Please sign in to comment.