diff options
author | Robert Noland <rnoland@2hip.net> | 2008-10-03 14:05:45 -0400 |
---|---|---|
committer | Robert Noland <rnoland@2hip.net> | 2008-10-03 14:05:45 -0400 |
commit | 9c0ce38df3d9026785155d06fc62bdd7acaf8bf0 (patch) | |
tree | db627d17b973fb57cca446d17809369a2c77fda2 /bsd-core/sis_drv.c | |
parent | 4c92abfa8d0b9f2ab14e6b915bdffd47fd2e2474 (diff) |
[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
Diffstat (limited to 'bsd-core/sis_drv.c')
-rw-r--r-- | bsd-core/sis_drv.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/bsd-core/sis_drv.c b/bsd-core/sis_drv.c index 2ae1bff0..c69a093c 100644 --- a/bsd-core/sis_drv.c +++ b/bsd-core/sis_drv.c @@ -69,7 +69,9 @@ sis_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); + sis_configure(dev); return drm_attach(nbdev, sis_pciidlist); |