diff --git a/mm/memory-tiers.c b/mm/memory-tiers.c index 939e200c283bbb313056b9c8479a20bfd04f6154..c734658c6242443d5c2a4609531028c939846d74 100644 --- a/mm/memory-tiers.c +++ b/mm/memory-tiers.c @@ -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__); /*