summaryrefslogtreecommitdiffstats
path: root/sys/dev/drm/mga_drv.c
diff options
context:
space:
mode:
authorrnoland <rnoland@FreeBSD.org>2008-10-04 14:48:40 +0000
committerrnoland <rnoland@FreeBSD.org>2008-10-04 14:48:40 +0000
commite416dd643a947a6b0b74b8cd709467a599dc72c8 (patch)
tree106a6245b0aea5865f11410c76f386b1c0bc8f38 /sys/dev/drm/mga_drv.c
parent6d0a9a164f2ca73f1303af9b5f7dcb07b5765c3f (diff)
downloadFreeBSD-src-e416dd643a947a6b0b74b8cd709467a599dc72c8.zip
FreeBSD-src-e416dd643a947a6b0b74b8cd709467a599dc72c8.tar.gz
Use M_WAITOK when allocating driver memory
We don't explicity check for error here and M_WAITOK will just put the process to sleep waiting on resources to become available. Suggested by jhb@ Approved by: jhb (mentor)
Diffstat (limited to 'sys/dev/drm/mga_drv.c')
-rw-r--r--sys/dev/drm/mga_drv.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/dev/drm/mga_drv.c b/sys/dev/drm/mga_drv.c
index 049d54b..f3d9cae 100644
--- a/sys/dev/drm/mga_drv.c
+++ b/sys/dev/drm/mga_drv.c
@@ -132,7 +132,9 @@ mga_attach(device_t nbdev)
bzero(dev, sizeof(struct drm_device));
- dev->driver = malloc(sizeof(struct drm_driver_info), M_DRM, M_NOWAIT | M_ZERO);
+ dev->driver = malloc(sizeof(struct drm_driver_info), M_DRM,
+ M_WAITOK | M_ZERO);
+
mga_configure(dev);
return drm_attach(nbdev, mga_pciidlist);
OpenPOWER on IntegriCloud