From: Christopher Harvey <charvey@matrox.com>
To: dri-devel@lists.freedesktop.org
Subject: Re: [PATCH] drm/mgag200: Don't do full cleanup if mgag200_device_init fails
Date: Wed, 12 Jun 2013 13:16:40 -0400 [thread overview]
Message-ID: <87mwqvtfk7.fsf@matrox.com> (raw)
In-Reply-To: <20130605152957.6055AF4DC4@venus.matrox.com>
On Wed, Jun 05 2013, Christopher Harvey <charvey@matrox.com> wrote:
> Running mgag200_driver_unload when the driver init fails early on
> causes functions like drm_mode_config_cleanup to be called. The
> problem is, drm_mode_config_cleanup crashes because the corresponding
> init hasn't happend yet. There really isn't anything to cleanup after
> mgag200_device_init, so we can just pass the error code upwards.
>
> Acked-by: Julia Lemire <jlemire@matrox.com>
> Signed-off-by: Christopher Harvey <charvey@matrox.com>
> ---
> drivers/gpu/drm/mgag200/mgag200_main.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/mgag200/mgag200_main.c b/drivers/gpu/drm/mgag200/mgag200_main.c
> index 5189675..6d6b598 100644
> --- a/drivers/gpu/drm/mgag200/mgag200_main.c
> +++ b/drivers/gpu/drm/mgag200/mgag200_main.c
> @@ -209,7 +209,7 @@ int mgag200_driver_load(struct drm_device *dev, unsigned long flags)
> r = mgag200_device_init(dev, flags);
> if (r) {
> dev_err(&dev->pdev->dev, "Fatal error during GPU init: %d\n", r);
> - goto out;
> + return r;
> }
> r = mgag200_mm_init(mdev);
> if (r)
ping.
next prev parent reply other threads:[~2013-06-12 17:12 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-05 15:29 [PATCH] drm/mgag200: Don't do full cleanup if mgag200_device_init fails Christopher Harvey
2013-06-12 17:16 ` Christopher Harvey [this message]
2013-06-12 21:16 ` Paul Menzel
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=87mwqvtfk7.fsf@matrox.com \
--to=charvey@matrox.com \
--cc=dri-devel@lists.freedesktop.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.