arch/alpha/kernel: Add kmalloc NULL tests
[pandora-kernel.git] / arch / alpha / kernel / core_titan.c
index 319fcb7..219bf27 100644 (file)
@@ -680,7 +680,7 @@ titan_agp_bind_memory(alpha_agp_info *agp, off_t pg_start, struct agp_memory *me
 {
        struct titan_agp_aperture *aper = agp->aperture.sysdata;
        return iommu_bind(aper->arena, aper->pg_start + pg_start, 
-                         mem->page_count, mem->memory);
+                         mem->page_count, mem->pages);
 }
 
 static int 
@@ -757,6 +757,8 @@ titan_agp_info(void)
         * Allocate the info structure.
         */
        agp = kmalloc(sizeof(*agp), GFP_KERNEL);
+       if (!agp)
+               return NULL;
 
        /*
         * Fill it in.