Merge tag 'modules-for-v5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/jeyu...
[linux-2.6-microblaze.git] / drivers / edac / sifive_edac.c
index c0cc72a..3a3dcb1 100644 (file)
@@ -54,8 +54,8 @@ static int ecc_register(struct platform_device *pdev)
        p->dci = edac_device_alloc_ctl_info(0, "sifive_ecc", 1, "sifive_ecc",
                                            1, 1, NULL, 0,
                                            edac_device_alloc_index());
-       if (IS_ERR(p->dci))
-               return PTR_ERR(p->dci);
+       if (!p->dci)
+               return -ENOMEM;
 
        p->dci->dev = &pdev->dev;
        p->dci->mod_name = "Sifive ECC Manager";