Signed-off-by: Mariusz Kozlowski drivers/char/drm/drm_agpsupport.c | 13896 -> 13828 (-68 bytes) drivers/char/drm/drm_agpsupport.o | 120046 -> 119814 (-232 bytes) drivers/char/drm/drm_agpsupport.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) --- linux-2.6.23-rc3-mm1.orig/drivers/char/drm/drm_agpsupport.c +++ linux-2.6.23-rc3-mm1/drivers/char/drm/drm_agpsupport.c @@ -216,10 +216,10 @@ int drm_agp_alloc(struct drm_device *dev if (!dev->agp || !dev->agp->acquired) return -EINVAL; - if (!(entry = drm_alloc(sizeof(*entry), DRM_MEM_AGPLISTS))) - return -ENOMEM; - memset(entry, 0, sizeof(*entry)); + entry = drm_zalloc(sizeof(*entry), DRM_MEM_AGPLISTS); + if (!entry) + return -ENOMEM; pages = (request->size + PAGE_SIZE - 1) / PAGE_SIZE; type = (u32) request->type; @@ -444,11 +444,12 @@ int drm_agp_free_ioctl(struct inode *ino */ struct drm_agp_head *drm_agp_init(struct drm_device *dev) { - struct drm_agp_head *head = NULL; + struct drm_agp_head *head; - if (!(head = drm_alloc(sizeof(*head), DRM_MEM_AGPLISTS))) + head = drm_zalloc(sizeof(*head), DRM_MEM_AGPLISTS); + if (!head) return NULL; - memset((void *)head, 0, sizeof(*head)); + head->bridge = agp_find_bridge(dev->pdev); if (!head->bridge) { if (!(head->bridge = agp_backend_acquire(dev->pdev))) { -- - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/