From 9c0ce38df3d9026785155d06fc62bdd7acaf8bf0 Mon Sep 17 00:00:00 2001 From: Robert Noland Date: Fri, 3 Oct 2008 14:05:45 -0400 Subject: [FreeBSD] Use M_WAITOK when allocating driver memory. We don't explicitly check for error here and M_WAITOK will just put the process to sleep waiting on resources to become available. Suggested by John Baldwin --- bsd-core/radeon_drv.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'bsd-core/radeon_drv.c') diff --git a/bsd-core/radeon_drv.c b/bsd-core/radeon_drv.c index 8ab3e995..6b90dd69 100644 --- a/bsd-core/radeon_drv.c +++ b/bsd-core/radeon_drv.c @@ -89,7 +89,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); -- cgit v1.2.3