diff options
author | rnoland <rnoland@FreeBSD.org> | 2008-10-04 14:48:40 +0000 |
---|---|---|
committer | rnoland <rnoland@FreeBSD.org> | 2008-10-04 14:48:40 +0000 |
commit | e416dd643a947a6b0b74b8cd709467a599dc72c8 (patch) | |
tree | 106a6245b0aea5865f11410c76f386b1c0bc8f38 /sys/dev/drm/radeon_drv.c | |
parent | 6d0a9a164f2ca73f1303af9b5f7dcb07b5765c3f (diff) | |
download | FreeBSD-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/radeon_drv.c')
-rw-r--r-- | sys/dev/drm/radeon_drv.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/dev/drm/radeon_drv.c b/sys/dev/drm/radeon_drv.c index 5a44093..caddf1e 100644 --- a/sys/dev/drm/radeon_drv.c +++ b/sys/dev/drm/radeon_drv.c @@ -92,7 +92,9 @@ radeon_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); + radeon_configure(dev); return drm_attach(nbdev, radeon_pciidlist); |