Merge tag 'soc-fixes-6.2-1' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc
[platform/kernel/linux-starfive.git] / mm / memory-tiers.c
index fa8c9d0..c734658 100644 (file)
@@ -645,7 +645,7 @@ static int __init memory_tier_init(void)
         * than default DRAM tier.
         */
        default_dram_type = alloc_memory_type(MEMTIER_ADISTANCE_DRAM);
-       if (!default_dram_type)
+       if (IS_ERR(default_dram_type))
                panic("%s() failed to allocate default DRAM tier\n", __func__);
 
        /*
@@ -664,7 +664,7 @@ static int __init memory_tier_init(void)
        establish_demotion_targets();
        mutex_unlock(&memory_tier_lock);
 
-       hotplug_memory_notifier(memtier_hotplug_callback, MEMTIER_HOTPLUG_PRIO);
+       hotplug_memory_notifier(memtier_hotplug_callback, MEMTIER_HOTPLUG_PRI);
        return 0;
 }
 subsys_initcall(memory_tier_init);