Signed-off-by: Mariusz Kozlowski <[EMAIL PROTECTED]>

 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))) {

--

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
--
_______________________________________________
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel

Reply via email to