arch/alpha/kernel: Add kmalloc NULL tests
[safe/jmp/linux-2.6] / arch / alpha / kernel / core_marvel.c
index 8e059e5..53dd2f1 100644 (file)
@@ -1103,6 +1103,8 @@ marvel_agp_info(void)
         * Allocate the info structure.
         */
        agp = kmalloc(sizeof(*agp), GFP_KERNEL);
+       if (!agp)
+               return NULL;
 
        /*
         * Fill it in.