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)
This commit is contained in:
parent
4d3ad1c1a6
commit
e0b8582173
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=183604
@ -114,7 +114,9 @@ i915_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);
|
||||
|
||||
i915_configure(dev);
|
||||
|
||||
return drm_attach(nbdev, i915_pciidlist);
|
||||
|
@ -88,7 +88,9 @@ mach64_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);
|
||||
|
||||
mach64_configure(dev);
|
||||
|
||||
return drm_attach(nbdev, mach64_pciidlist);
|
||||
|
@ -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);
|
||||
|
@ -87,7 +87,9 @@ r128_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);
|
||||
|
||||
r128_configure(dev);
|
||||
|
||||
return drm_attach(nbdev, r128_pciidlist);
|
||||
|
@ -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);
|
||||
|
@ -78,7 +78,9 @@ savage_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);
|
||||
|
||||
savage_configure(dev);
|
||||
|
||||
return drm_attach(nbdev, savage_pciidlist);
|
||||
|
@ -72,7 +72,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);
|
||||
|
@ -74,7 +74,9 @@ tdfx_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);
|
||||
|
||||
tdfx_configure(dev);
|
||||
|
||||
return drm_attach(nbdev, tdfx_pciidlist);
|
||||
|
Loading…
Reference in New Issue
Block a user