aboutsummaryrefslogtreecommitdiff
path: root/linux-core/xgi_drv.c
diff options
context:
space:
mode:
authorIan Romanick <idr@us.ibm.com>2007-07-19 19:08:47 -0700
committerIan Romanick <idr@us.ibm.com>2007-07-19 19:08:47 -0700
commit970674f4867d65bd16cf3585d46930b72a827cce (patch)
tree217ba771845101db63e1bfac5c1a7fe266380937 /linux-core/xgi_drv.c
parenta33f5487296eacf503f5b27ba829f5fbdae8e63b (diff)
Fix error handing related to xgi_cmdlist_initialize.
xgi_cmdlist_initialize wasn't correctly checking for errors from xgi_pcie_alloc. Furthermore, xgi_bootstrap, the one caller of xgi_cmdlist_initialize, wasn't check its return value.
Diffstat (limited to 'linux-core/xgi_drv.c')
-rw-r--r--linux-core/xgi_drv.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/linux-core/xgi_drv.c b/linux-core/xgi_drv.c
index 13e79169..c4e7daae 100644
--- a/linux-core/xgi_drv.c
+++ b/linux-core/xgi_drv.c
@@ -231,7 +231,11 @@ int xgi_bootstrap(DRM_IOCTL_ARGS)
}
/* Alloc 1M bytes for cmdbuffer which is flush2D batch array */
- xgi_cmdlist_initialize(info, 0x100000);
+ err = xgi_cmdlist_initialize(info, 0x100000);
+ if (err) {
+ DRM_ERROR("xgi_cmdlist_initialize() failed\n");
+ return err;
+ }
info->bootstrap_done = 1;
return 0;