From: Marcin Slusarz <marcin.slusarz-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
Subject: Re: [PATCH] drm/nouveau: cleanup after display init failure
Date: Thu, 22 Dec 2011 17:55:22 +0100 [thread overview]
Message-ID: <20111222165522.GC6111@joi.lan> (raw)
In-Reply-To: <20111211200205.GA12385-OI9uyE9O0yo@public.gmane.org>
On Sun, Dec 11, 2011 at 09:02:05PM +0100, Marcin Slusarz wrote:
> Depending on exact point of failure, not cleaning would lead to
> BUG_ONs/oopses in various distant places.
>
> Signed-off-by: Marcin Slusarz <marcin.slusarz-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> ---
> drivers/gpu/drm/nouveau/nouveau_display.c | 11 +++++++++--
> 1 files changed, 9 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/nouveau/nouveau_display.c b/drivers/gpu/drm/nouveau/nouveau_display.c
> index 05f1692..bea7a41 100644
> --- a/drivers/gpu/drm/nouveau/nouveau_display.c
> +++ b/drivers/gpu/drm/nouveau/nouveau_display.c
> @@ -304,14 +304,21 @@ nouveau_display_create(struct drm_device *dev)
>
> ret = disp->create(dev);
> if (ret)
> - return ret;
> + goto disp_create_err;
>
> if (dev->mode_config.num_crtc) {
> ret = drm_vblank_init(dev, dev->mode_config.num_crtc);
> if (ret)
> - return ret;
> + goto vblank_err;
> }
>
> + return 0;
> +
> +vblank_err:
> + disp->destroy(dev);
> +disp_create_err:
> + drm_kms_helper_poll_fini(dev);
> + drm_mode_config_cleanup(dev);
> return ret;
> }
>
> --
ping
prev parent reply other threads:[~2011-12-22 16:55 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-11 20:02 [PATCH] drm/nouveau: cleanup after display init failure Marcin Slusarz
[not found] ` <20111211200205.GA12385-OI9uyE9O0yo@public.gmane.org>
2011-12-22 16:55 ` Marcin Slusarz [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20111222165522.GC6111@joi.lan \
--to=marcin.slusarz-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
--cc=nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.