* [PATCH] drm/mgag200: Don't do full cleanup if mgag200_device_init fails
@ 2013-06-05 15:29 Christopher Harvey
2013-06-12 17:16 ` Christopher Harvey
2013-06-12 21:16 ` Paul Menzel
0 siblings, 2 replies; 3+ messages in thread
From: Christopher Harvey @ 2013-06-05 15:29 UTC (permalink / raw)
To: dri-devel
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)
--
1.8.1.5
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] drm/mgag200: Don't do full cleanup if mgag200_device_init fails
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
2013-06-12 21:16 ` Paul Menzel
1 sibling, 0 replies; 3+ messages in thread
From: Christopher Harvey @ 2013-06-12 17:16 UTC (permalink / raw)
To: dri-devel
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.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] drm/mgag200: Don't do full cleanup if mgag200_device_init fails
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
@ 2013-06-12 21:16 ` Paul Menzel
1 sibling, 0 replies; 3+ messages in thread
From: Paul Menzel @ 2013-06-12 21:16 UTC (permalink / raw)
To: Christopher Harvey; +Cc: dri-devel
[-- Attachment #1.1: Type: text/plain, Size: 816 bytes --]
Dear Christopher,
Am Mittwoch, den 05.06.2013, 11:29 -0400 schrieb Christopher Harvey:
> 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(-)
[…]
Acked-by: Paul Menzel <paulepanter@users.sourceforge.net>
You should always CC the maintainer when sending in patches.
Thanks,
Paul
[-- Attachment #1.2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
[-- Attachment #2: Type: text/plain, Size: 159 bytes --]
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-06-12 21:16 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2013-06-12 21:16 ` Paul Menzel
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.