x86/amd_nb: Fix boot crash on non-AMD systems
[pandora-kernel.git] / arch / x86 / kernel / amd_nb.c
index be16854..6974618 100644 (file)
@@ -59,8 +59,8 @@ int amd_cache_northbridges(void)
        while ((misc = next_northbridge(misc, amd_nb_misc_ids)) != NULL)
                i++;
 
-       if (i == 0)
-               return 0;
+       if (!i)
+               return -ENODEV;
 
        nb = kzalloc(i * sizeof(struct amd_northbridge), GFP_KERNEL);
        if (!nb)