summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/mgag200
diff options
context:
space:
mode:
authorChristopher Harvey <charvey@matrox.com>2013-06-05 11:29:57 -0400
committerDave Airlie <airlied@gmail.com>2013-06-17 19:42:49 +1000
commit279119776d98305af08466c6cc9b7869c57c706f (patch)
tree3cb57709c7d80ccbcf6f25f980caf61a8b0f5068 /drivers/gpu/drm/mgag200
parenta080db9fdda77ffaa43679d21b4bd78ead0cf9e1 (diff)
downloadblackbird-op-linux-279119776d98305af08466c6cc9b7869c57c706f.tar.gz
blackbird-op-linux-279119776d98305af08466c6cc9b7869c57c706f.zip
drm/mgag200: Don't do full cleanup if mgag200_device_init fails
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> Acked-by: Paul Menzel <paulepanter@users.sourceforge.net> Signed-off-by: Dave Airlie <airlied@gmail.com>
Diffstat (limited to 'drivers/gpu/drm/mgag200')
-rw-r--r--drivers/gpu/drm/mgag200/mgag200_main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/mgag200/mgag200_main.c b/drivers/gpu/drm/mgag200/mgag200_main.c
index 51896757b3c2..6d6b598ff791 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)
OpenPOWER on IntegriCloud